|
From: Sascha S. <sc...@te...> - 2005-05-03 07:26:06
|
Hi, this seems to be very nice! Unfortunately my knowledge about the inner li= fe of matplotlib is not that deep, so I didn't understand where and what = to change to benefit from the new format. Could you please give some further information. Thanks! Sascha =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > Message: 7 > From: Darren Dale <dd...@co...> > Reply-To: dd...@co... > To: mat...@li..., > mat...@li... > Date: Mon, 2 May 2005 19:57:08 -0400 > Subject: [Matplotlib-users] new scientific notation format >Hi Everyone, >There is a new formatter in ticker.py called NewScalarFormatter. If you = have > scientific notation in your plots, you may like the results. If you wou= ld > like to try it out, you need to change ScalarFormatter->OldScalarFormat= ter, > and NewScalarFormatter->ScalarFormatter. It will then be the default fo= r > linear scale axes. I would appreciate feedback, it will hopefully becom= e the > default at some point. >Darren >--__--__-- >Message: 8 > To: dd...@co... > Cc: mat...@li... > From: John Hunter <jdh...@ac...> > Date: Mon, 02 May 2005 21:08:20 -0500 > Subject: [Matplotlib-users] Re: [matplotlib-devel] new scientific notat= ion format > >>>>>> "Darren" =3D=3D Darren Dale <dd...@co...> writes: > Darren> Hi Everyone, There is a new formatter in ticker.py called > Darren> NewScalarFormatter. If you have scientific notation in > Darren> your plots, you may like the results. If you would like to > Darren> try it out, you need to change > Darren> ScalarFormatter->OldScalarFormatter, and > Darren> NewScalarFormatter->ScalarFormatter. It will then be the > Darren> default for linear scale axes. I would appreciate > Darren> feedback, it will hopefully become the default at some > Darren> point. >Maybe you can provide an example that illustrates the range of normal > and pathological changes that the new formatter is designed to > address, so that people can compare the results visually. >The basic problem the new formatter is trying to solve is to properly > format cases where the view limits range from something like 2e10 to > 2e10+5. > from pylab import * > x =3D arange(5.0) > plot(x+2e10, x) > show() >Ie, limits where the range is small compared to end values. In this > case the new formatter figures out what the offset is, factors it out > of the ticks, and displays it on the axis, so for the case above, you > would see something like this for the x-axis > ---------------------------------------------- > 0 1 2 3 4 5 > +2e10 >and the location of the offset text (2e10) is configurable. |