>>>>> "Darren" == Darren Dale <[EMAIL PROTECTED]> writes:
Darren> I fixed that problem in the qt backends by telling the
Darren> label to ignore sizing hints. We could make the format
Darren> string shorter, but even then, depending on the size of
Darren> the window, this problem can occur. What format would you
Darren> prefer to be reported on the toolbar?
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)
and overrode it for the scalar formatter
def format_data_short(self,value):
'return a short formatted string representation of a number'
return '%1.3g'%value
and used this to format the x and y coords. What do you think about
that (revision 2666)?
JDH
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel