Jochen Küpper wrote:
> Hi,
> 
> when I create a contour plot with the following grid:
>    xval = [ 1.00003324,  1.00009971,  1.00016618]
>    yval = [250, 260, 270]
>    data = ones((3,3))
>    contourf(xval, yval, data)
> 
> matplotlib creates a contour plot with an x-axes labels of  
> "0.0000324", ... and adds a "+1" in the lower right corner.
> Actually, it is often not visible at all.
> 
> How can I set it to always use the "correct" values directly as labels?
> 
> Greetings,
> Jochen

Hi, you can use

gca().xaxis.set_major_formatter(ScalarFormatter(useOffset=False))

see also examples/newscalarformatter_demo.py

Manuel

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to