Just a little follow-up point. The normal axis autoscaling, with "plot(t, s, 'b-')" commented out, doesn't take account of the errorbar extrema. That is, the errorbars extend beyond the autoscaled window, whereas the window should be scaled to fully contain the errorbars.
----- Original Message -----
From: "Gary Ruben" <ga...@em...>
Date: Thu, 22 Apr 2004 20:19:10 +1000
To: mat...@li...
Subject: [Matplotlib-users] axis scaling anomaly
> Here's an example of my attempt to plot errorbar data with a series line of a different colour. This example reveals an anomaly with the axis scaling which may the sign of an underlying bug. If you comment out the "plot(t, s, 'b-')" line and run the example, the axes autoscale. If you run the example as is, the scaling changes for some reason.
> Gary Ruben
> :
>
>
> from matplotlib.matlab import *
>
> t = arange(0.1, 4, 0.1)
> s = exp(-t)
> e = 0.1*randn(len(s))
> f = 0.1*randn(len(s))
>
> grid(1)
> lines = errorbar(t, s, e, f, '.', capsize=4)
> set(lines, 'color', 'g')
> plot(t, s, 'b-')
> xlabel('Distance (m)')
> ylabel('Height (m)')
> title('Mean and standard error as a function of distance')
> show()
--
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm
|