From: John H. <jd...@gm...> - 2012-02-08 16:28:38
|
On Wed, Feb 8, 2012 at 10:24 AM, Ted To <rai...@th...> wrote: > On 02/08/2012 11:17 AM, John Hunter wrote: > > > > > > On Wed, Feb 8, 2012 at 10:06 AM, Ted To <rai...@th... > > <mailto:rai...@th...>> wrote: > > > > If it hasn't been fixed, is there a workaround? > > > > On 02/08/2012 10:42 AM, Ted To wrote: > > > I believe I have traced it to some axhline and axis commands and > > this is > > > apparently an old problem. Does it work with version 1.1.0? I > have > > > 1.0.1 installed on a debian system. > > > > > > Can you "print(dates)" before calling plot in the environment in which > > it fails and post the output here. > > > > JDH > > Sure, the commands where it crashes and the output are: > > print dates > pyplot.axis([0, len(prices.label[0]), -1.5, 1.5]) > OK, here is where the problem is. In the plt.axis call you are setting the x-axis min to 0 which is not a legal date value. I suggest letting the x-axis take care of itself, and set the y-axis limits with plt.ylim(-1.5, 1.5) JDH |