From: Eric F. <ef...@ha...> - 2011-05-17 18:28:22
|
On 05/17/2011 01:53 AM, Joachim Saul wrote: > All, > > I have stumbled upon a (for me) unexpected behaviour of axvspan(). > > > import matplotlib.pylab as plt > from numpy import * > > x = arange(1000) > y = 0.2*sin(0.02*x) > > ax = plt.axes() > plt.axvspan(250, 400, facecolor='g', alpha=0.2) > plt.plot(x,y) > plt.show() > > > The displayed y range is -0.2 to 1, while from the sine amplitude I > would have expected -0.2 to 0.2. The expected y range can be obtained by > omitting the axvspan() call and also if it is called *after* plot(). > > Is this the desired behaviour, especially in view of the dependence on > the call order? No, it is a bug. Eric > > __version__ is 1.1.0 > > Cheers, > Joachim > > ------------------------------------------------------------------------------ > Achieve unprecedented app performance and reliability > What every C/C++ and Fortran developer should know. > Learn how Intel has extended the reach of its next-generation tools > to help boost performance applications - inlcuding clusters. > http://p.sf.net/sfu/intel-dev2devmay > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |