2010/3/4 Timo Heine <timo.he...@gmail.com>: > Basically what I want to do is to draw a horizontal line with relative y > co-ordinates and absolute xmin and xmax co-ordinate. Then I could draw a > line when a bit is high and have it always in plot area even when zooming > etc. Like axhline(...) but with relative y and absolute x > co-ordinates.
I found a better solution candidate now, but I don't know whether it works: import matplotlib.transforms import matplotlib.lines <create Axes instance by calling fig.add_axes() or fig.add_subplot()> trans = matplotlib.transforms.blended_transform_factory(axes.transData, axes.transAxes) line = matplotlib.lines.Line2D([xmin, xmax], [yrel, yrel], transform = trans, <whatever like color = 'r'>) line.y_isdata = False axes.add_line(line) The code is taken from axes.py:Axes.axhline() with some alterations. Friedrich ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users