John Hunter wrote: [...] > Simson> To answer Eric's most recent posting: > > Simson> 1. I think that scientific notation should not be the > Simson> default, unless numbers exceed 1E+7. > > I agree with this -- scientific notation kicks in too soon IMO. I > think an rc setting would be fine. I am not adverse to more rc > settings personally. I haven't seen too many problems arising from > having a lot of rc settings.
I have added an rc setting called axes.formatter.limits and set the defaults to -7, 7, so that now scientific notation starts at 1e+-7. This may be too large for some tastes--but at least now it is configurable. Maybe other users will comment on what they think the defaults should be. I don't have a strong opinion. I also added a convenience method to the Axes class (called ticklabel_format())to make it easier to turn scientific notation on or off on either or both axes, with the idea that other formatting control might be added to the method later. I have not made the method a pylab function yet; I would rather wait until it settles down and people have had a chance to request a different name or turn thumbs down on the whole thing or whatever. Suggestions for better names or other aspects of these API additions are welcome. I have found it difficult to come up with short and descriptive names, and don't feel I have done particularly well. > > Simson> 2. It would be nice if there was an easy way to get commas > Simson> into numbers. (This is forever a problem; I wish that the > Simson> original C folks had thought to put commas into their > Simson> original printf formatting. I have a nice python commas > Simson> function if you want it, although you can probably create > Simson> one that is more efficient.) I wrote part of an "add_commas" function with the idea of letting its use be an option in the ScalarFormatter--I think this would be better than adding a whole separate Formatter. But it is not finished (lacks support for signs and exponential notation) and I need to do other things now. Simson, if you have not already plunged into John's suggestion below, I would be happy to see your comma function--please send it. But if you are inspired to come up with a comma-adding formatter or modification to ScalarFormatter, that's even better. > > This would be a great custom formatter -- see > http://matplotlib.sf.net/matplotlib.ticker.html for details on the > Formatter. Please contribute one if you can. [...] Eric ------------------------------------------------------------------------- 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