On 09/30/2010 08:28 AM, Joey Richards wrote:
> When I use the errorbar() routine to plot data, unless I set hold=True as a 
> kwarg (or set it globally), the data are plotted without the errorbars.  I 
> believe it is because the routine first plots the error bars, then overplots 
> the data points and for some reason the routine is clearing the axis in 
> between these steps.
>


Joey,

That is a major bug in errorbar.  I suspect no one has brought it to our 
attention before because hold=True is the default.  The only workaround 
is what you have already found: ensure hold is True for the call to 
errorbar.

If there is no reply within a couple of days to the effect that someone 
has fixed this bug, then please file a ticket so that we don't forget 
about it.  http://sourceforge.net/tracker/?group_id=80706&atid=560720

Eric

> This is rather annoying for interactive use and does not seem to be the 
> expected behavior.  For example, if I run the example code from the errorbar 
> page (my copy pasted below), I get a nice plot of the data with no error 
> bars.  This seems to be the effect either from within "ipython -pylab" or 
> from standalone scripts.
>
> Any advice would be greatly appreciated, thanks.
>
> joey
>
>
> import numpy as np
> import matplotlib.pyplot as plt
>
> # example data
> x = np.arange(0.1, 4, 0.5)
> y = np.exp(-x)
>
> # example variable error bar values
> yerr = 0.1 + 0.2*np.sqrt(x)
> xerr = 0.1 + yerr
>
> # First illustrate basic pyplot interface, using defaults where possible.
> plt.figure()
> plt.errorbar(x, y, xerr=0.2, yerr=0.4)
> plt.title("Simplest errorbars, 0.2 in x, 0.4 in y")
>
> plt.show()
>
>
>
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to