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.
This was by design. I had a version at one point that would have looked like
this for your example:
···
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.
----------------------------------------------
-5 -4 -3 -2 -1 0
x1e5+2e10
I didnt want positive data to have negative ticklabels, I think it is more
important to understand the plot at a glance, even if it results in an ugly
offset. What really settled the issue in my mind is that you can always find
a case that produces an ugly offset, for example:
plot(arange(0,1e5,1e4)+7.777777777e15). When you consider zooming the plot
and panning the plot, there needs to be a consistent method to determine the
offset, otherwise the ticklabels could switch from positive or negative while
you navigate.
in ticker.py, you can set useOffset in ScalarFormatter.__init__() to False,
which would give you more or less the current behavior:
----------------------------------------------
2 2 2 2 2 2
x1e10
With the new default behavior (useOffset=True), if you don't like the offset,
you can at least interpret your data and decide how to process it in order to
generate a more acceptable plot.
Thank you for pointing this out.
--
Darren S. Dale
Bard Hall
Department of Materials Science and Engineering
Cornell University
Ithaca, NY. 14850
dd55@...163...
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
dd55@...163...
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