Changeset 1425 for trunk


Ignore:
Timestamp:
06/20/08 13:02:24 (16 years ago)
Author:
Malte Marquarding
Message:

Handle api change in matplotlib-0.98

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asaplotbase.py

    r1259 r1425  
    1515from matplotlib.ticker import OldScalarFormatter
    1616from matplotlib.ticker import NullLocator
    17 from matplotlib.transforms import blend_xy_sep_transform
     17
     18# API change in mpl >= 0.98
     19try:
     20    from matplotlib.transforms import blended_transform_factory
     21except ImportError:
     22    from matplotlib.transforms import blend_xy_sep_transform  as blended_transform_factory
    1823
    1924if int(matplotlib.__version__.split(".")[1]) < 87:
     
    781786            valign = 'top'
    782787            ylbl = ymin-0.01
    783         trans = blend_xy_sep_transform(ax.transData, ax.transAxes)
     788        trans = blended_transform_factory(ax.transData, ax.transAxes)
    784789        l = ax.axvline(x, ymin, ymax, color='black', **kwargs)
    785790        t = ax.text(x, ylbl ,label, verticalalignment=valign,
Note: See TracChangeset for help on using the changeset viewer.