Re: [Matplotlib-users] error bars, plot_date, and connected line
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.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] error bars, plot_date, and connected line
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.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] error bars, plot_date, and connected line
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. From my reading, errorbar() is a plot type, just like plot() and plot_date(). So there doesn't seem to be any obvious way to combine them. Am I missing something ? Do I need to manually build this? smime.p7s Description: S/MIME cryptographic signature - 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.phpp=sourceforgeCID=DEVDEV___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users