From: Darren D. <dd...@co...> - 2005-05-03 14:48:11
|
On Tuesday 03 May 2005 10:02 am, Humufr wrote: > I tried the new notation and I think it's good but sometimes the result > is not so good. For example with the plot ( plot(x+2e10, -x+2e6) ) I > have a: +1.99999e6 for the y scale and it's not exactly the goal of this > change I think. > But good idea for this change. > This was by design. I had a version at one point that would have looked lik= e=20 this for your example: =A0---------------------------------------------- =A0 -5 =A0 =A0 =A0 -4 =A0 =A0 =A0 =A0-3 =A0 =A0 =A0 -2 =A0 =A0 =A0 -1 =A0 = =A0 =A0 =A00 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 x1e5+2e10=20 I didnt want positive data to have negative ticklabels, I think it is more= =20 important to understand the plot at a glance, even if it results in an ugly= =20 offset. What really settled the issue in my mind is that you can always fin= d=20 a case that produces an ugly offset, for example:=20 plot(arange(0,1e5,1e4)+7.777777777e15). When you consider zooming the plot= =20 and panning the plot, there needs to be a consistent method to determine th= e=20 offset, otherwise the ticklabels could switch from positive or negative whi= le=20 you navigate. in ticker.py, you can set useOffset in ScalarFormatter.__init__() to False,= =20 which would give you more or less the current behavior: ---------------------------------------------- 2 2 2 2 2 2 x1e10=20 With the new default behavior (useOffset=3DTrue), if you don't like the off= set,=20 you can at least interpret your data and decide how to process it in order = to=20 generate a more acceptable plot. Thank you for pointing this out. =2D-=20 Darren S. Dale Bard Hall Department of Materials Science and Engineering Cornell University Ithaca, NY. 14850 dd...@co... |