I think this is just historical, since matplotlib never used to rely on 
having proper Unicode character rendering in all backends.  (And 
displaying a multiplication symbol, rather than just * or x requires 
non-ascii).  I believe that is no longer a problem these days, so we 
could change it to display a multiplication symbol.

This doesn't appear to be a regression from an earlier version.  Was 
that what you're implying?

All that said, this raises another question -- we should probably make 
it easier to set useMathText to True in the ScalarFormatter, either 
through an rcParam or a kwarg somewhere.  As it stands, it appears 
(unless my grepping search has been wrong) the only way to get this 
behavior is by modifying the matplotlib source.  Not ideal ;)

Mike

Paul Novak wrote:
> Hello,
>
> Using the following simple script, the scientific notation used on the 
> y-axis is missing a multiplication symbol, as seen in the figure. My 
> matplotlibrc file consists of
>
> backend      : GTKAgg
>
> and I am using SVN r6760.
>
> I found this when I was trying to change the ScalarFormatter to have 
> useMathText = True by default, so the scientific notation would use a 
> superscript and not '1e7'.
>
> Paul Novak
>
> ---
> import matplotlib.pyplot as plt
> import numpy as np
>
> t = np.arange(0.0, 4.0)
> s = 2.0e7*t
> plt.plot(t, s, linewidth=1.0)
>
> plt.xlabel(r'time (s)')
> plt.ylabel('voltage (mV)')
> plt.show()
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It is the best place to buy or sell services for
> just about anything Open Source.
> http://p.sf.net/sfu/Xq1LFB
> ------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>   

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to