Ticket #153: asaplotbase.py.patch
File asaplotbase.py.patch, 956 bytes (added by , 15 years ago) |
---|
-
asaplotbase.py
old new 775 775 # a rough estimate for the bb of the text 776 776 if rotate > 0.0: lbloffset = 0.03*len(label) 777 777 peakoffset = 0.01 778 xy0 = ax.transData.xy_tup((x,y)) 779 # get relative coords 780 xy = ax.transAxes.inverse_xy_tup(xy0) 778 xy = None 779 xy0 = None 780 # matplotlib api change 0.98 is using transform now 781 if hasattr(ax.transData, "inverse_xy_tup"): 782 # get relative coords 783 xy0 = ax.transData.xy_tup((x,y)) 784 xy = ax.transAxes.inverse_xy_tup(xy0) 785 else: 786 xy0 = ax.transData.transform((x,y)) 787 # get relative coords 788 xy = ax.transAxes.inverted().transform(xy0) 781 789 if location.lower() == 'top': 782 790 ymax = 1.0-lbloffset 783 791 ymin = xy[1]+peakoffset