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 ax.vlines(dates,averages,p90) ax.hlines(p90,dates-.25,dates+.25) # Draw the bottom part of the error bars ax.vlines(dates,averages,p10) ax.hlines(p10,dates-.25,dates+.25) 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 >> having problems. > > My 2c: > 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: > if xdate: > self.xaxis_date(tz) > '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. > P. > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users