On Fri, Aug 27, 2010 at 7:21 AM, Stan Schymanski <sschym@...>wrote:
> Dear all,
> I don't know which update it was that broke it, but this used to work:
> import numpy
> import pylab
> fig = pylab.figure(1,figsize=(8,5))
> ax = fig.add_subplot(111, autoscale_on=False, xlim=(-1,5),
> t = numpy.arange(0.0, 5.0, 0.01)
> s = numpy.cos(2*numpy.pi*t)
> line, = ax.plot(t, s, lw=3, color='purple')
> pylab.text(-0.5,3.2,'no data',ha='center')
> This used to plot an arrow under the text 'no data' but above the main
> plot. Now this arrow does not appear unless at least part of it is within
> the plotting area. Change one of the '3.1' in the code above to, say, 3.0
> and the whole arrow is displayed. Is this a bug or is there a new way of
> achieving what I want?
> Thanks for your help already!
I wonder if it was one of the fixes to the clipping code. If I plot this to
the screen and then move the plot so that the "no data" text is in the plot
area, the arrow shows up.
So, the question is... was plotting arrows outside the plot area a bug or a
feature? And, if it was a bug, what about being able to annotate outside the
Lastly, whatever the outcome, this example should probably become a test
because it would be a great way to test for obscure broken behavior.
P.S. - cc'ing the devel mailing list here...
Get latest updates about Open Source Projects, Conferences and News.