On Thursday 10 August 2006 11:17, John Hunter wrote: > I'm a little confused here because the default should be to use the > axis major formatter (eg in the Axes.format_xdata function). Why > would the default formatter return such a long string? > > I don't know what the right answer is: using the default formatter is > usually irritating when plotting dates, since you often want a finer > resolution than you get with the tick formatting (eg if the ticks are > formatted to the nearest day, you may want to see H:M:S when > interacting). Clearly you can override this by using the fmt_xdata > and fmt_ydata attrs, but oftentimes I wish the defaults were better. > > As a quick solution, I added a default method to the Formatter base > class > > def format_data_short(self,value): > 'return a short string version' > return format_data(self,value)
I think there is a bug here. Maybe that last line should read return Formatter.format_data(self,value) or return self.format_data(value) I'm not sure what you had in mind. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel