From: Humufr <hu...@ya...> - 2005-05-03 14:02:39
|
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. N. |
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... |
From: Darren D. <dd...@co...> - 2005-05-05 03:36:28
|
I fixed two bugs in the new formatter, improving placement of the new labels so they play nice with changing font sizes and window resizes. I also added support for mathtext rendering of scientific notation, which can be toggled for now in ticker.NewScalarFormatter.__init__. Maybe I'll make it configurable in the rc file some day, depending on user sentiment. The changes are available in CVS. I think this thing is pretty functional and stable now. Please continue testing it! -- Darren S. Dale Bard Hall Department of Materials Science and Engineering Cornell University Ithaca, NY. 14850 dd...@co... |
From: Darren D. <dd...@co...> - 2005-05-05 16:33:59
|
In CVS, I added a file to the examples called newscalarformatter_demo.py, which shows how to use the NewScalarFormatter without renaming anything in ticker.py. It also illustrates the different options and improvements over the original formatter. I felt I was posting too frequently to this list, so I opened a bugreport at the sourceforge website (which includes images from the new demo). Please direct future comments and reports to the bugreport page. Thanks, Darren |
From: John H. <jdh...@ac...> - 2005-05-05 16:40:25
|
>>>>> "Darren" == Darren Dale <dd...@co...> writes: Darren> In CVS, I added a file to the examples called Darren> newscalarformatter_demo.py, which shows how to use the Darren> NewScalarFormatter without renaming anything in Darren> ticker.py. It also illustrates the different options and Darren> improvements over the original formatter. Well, you're "old formatter" example certainly makes a compelling case for the new one :-) The cm fonts are a bit irritating though, eg the \times symbol appears fainter than the numbers. Darren> I felt I was posting too frequently to this list, so I Darren> opened a bugreport at the sourceforge website (which Darren> includes images from the new demo). Please direct future Darren> comments and reports to the bugreport page. I don't think posting new features and bug fixes constitutes spam :-) JDH |