Thanks for Eric Firing's reply to me.The solution is: colorbar(im, extend='both', shrink=0.8,format='%0.1f%%',ticks=locator) The double % in the format string makes it print a single %, and when given a format string, the format kwarg automatically hands it off to a FormatStrFormatter.
-- View this message in context: http://www.nabble.com/formatter-on-colorbar-----tp16656691p16790326.html Sent from the matplotlib - users mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. 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