How to Change Axis Tick Mark Labels

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,