John Hunter wrote:
> On Jan 16, 2008 1:03 PM, Kevin Christman <[EMAIL PROTECTED]> wrote:
> def myfunc(x, pos=0):
>     return '%1.2f''%(100*x)

And you may want to try:

def myfunc(x, pos=0):
     return '%1.2f%%''%(100*x)

to get a percent sign after each value.  (I mention it only because the 
"double percent" trick is non-obvious to many newcomers to Python's 
string formatting syntax.)

Cheers,
Mike

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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to