Ah, sorry, forgot to reply to all. Please see the solution I provided to Jon.

---------- Forwarded message ----------
Date: 22 July 2012 15:08
Subject: Re: [Matplotlib-users] How to Change Axis Tick Mark Labels


Sounds like you want to use a FunctionFormatter rather than modifying
the ticks themselves. There is an example here
(http://stackoverflow.com/questions/8271564/matplotlib-comma-separated-number-format-for-axis).

Essentially:

import matplotlib.pyplot as plt
import matplotlib.ticker as mticker

def square_braces(tick_val, tick_pos):
    """Put square braces around the given tick_val """
    return '<%s>' % tick_val

ax = plt.axes()
plt(range(10))
ax.yaxis.set_major_formatter(mticker.FuncFormatter(func))
plt.show()

HTH,

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to