Eric Firing wrote: > Simson Garfinkel wrote: >> Thanks, Eric. Any idea for a work-around on the bar graphs? > > There appear to be three problems, each with a workaround or solution: > > 1) You need to set the log scale *before* calling bar. The bar method > checks for log scaling, and if found, it sets the bottom of the bars to > a positive value (1e-100) instead of to zero. If you set the log scale > *after* calling bar, the zero bottom value gets masked out as invalid. > > 2) The unit support for datetime objects doesn't quite know what to do > with the bar width parameter; it tries to convert it, and I haven't > tried to track down exactly what it ends up with. What I have found is > that if you use a value of width=20 as a kwarg in bar, you will get > close enough that you can make more adjustments to taste. This is an > ugly hack.
Correction: the unit conversion is perfectly sensible. It sees the width as a simple number and leaves it alone, so it is interpreted as being in the units that the datetime gets converted to: days. Eric > > 3) The datetime objects want full years, e.g. 1990, not just the last > two digits. I haven't tried to figure out why, but the x-limits don't > get calculated sensibly if you use 90 instead of 1990. It presumably > has to do with the ticker that is invoked for datetime. So I think you > need to either make your own modification of the ticker (or formatter), > or use all 4 year digits. > > >> As far as the Mac goes, I'm happy to get you a log-in on one, if you want. > > Thanks, but I really don't want to try to delve into the brand-new mac > native backend. > > Eric >> -Simson >> >> On Jan 8, 2009, at 2:31 PM, Eric Firing wrote: >> >>> Simson Garfinkel wrote: >>>> Hi! >>>> Below is a sample program. It demonstrates two bugs when plotting >>>> date/ time histograms. >>>> 1. When the y scale is made "log", the histogram points plot as >>>> lines, but when the y scale is not log, they histogram plots as >>>> bars. I do not think that the look of the bars should change >>>> depending on whether or not the Y scale is logarithmic. >>> Simson, >>> >>> I verified the strange behavior with log and/or date, but looking at >>> the code did not yield any understanding of what the problems are. I >>> hope someone who has worked on the bar code recently will sort this >>> one out. Definitely, there is at least one major bug that needs to be >>> fixed. >>> >>>> 2. When the "agg.pdf" is removed, specifying "log" for the yscale >>>> produces a TypeError on the mac (see below) >>> This is mac-specific, and I don't have a mac, so I can't help with >>> this, either. > > > ------------------------------------------------------------------------------ > Check out the new SourceForge.net Marketplace. > It is the best place to buy or sell services for > just about anything Open Source. > http://p.sf.net/sfu/Xq1LFB > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users ------------------------------------------------------------------------------ Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users