I've been able to figure out how to easily do error bars on a plot_date.
Here is how I do it:
The variables coming in are "dates" which is an array of my dates (in days since 0001-01-01), averages, p10 (which is the bottom of my error bars), and p90 (which is the top of my error bars)
plot_date(dates, averages, 'bo')
# Draw the tops of the error bars
# Draw the bottom part of the error bars
It's pretty sweet.
I'm having other problems which I will post separately, but this is working well.
On Dec 3, 2006, at 12:02 PM, Pierre GM wrote:
On Saturday 02 December 2006 17:39, Simson Garfinkel wrote:
Hi. I'm interested in creating a date plot showing bandwidth along a
link. I want to have a dot in the center of each date with the
average bandwidth and use the error bars to show the 25th and 75th
percentiles. I've been trying to figure out how to do this and am
Don't bother yet about dates: first get the plot as you want it, assuming that
your x data are floats (use date2num if needed). Then you can tackle the
problem of displaying dates.
If you poke around the sources (axes.py). you'll find that 'plot_date' is only
'plot', where a couple of extra parameters are set:
'xdate' is a flag indicating whether the data on the x axis are dates (True)
or not (False), 'tz' is the timezone flag (default to None), and 'self' is
your current axes object (you can get its handle by gca() if you haven't
specified it otherwise).
Combining these pieces of information should to the trick (or most of it).
Let us know how it goes anyway.