# How to name the ticks in a python matplotlib boxplot

Python matplotlib has a boxplot command.

Normally, all the parts of the graph are numerically ticked. How can I change the ticks to names instead of positions?

For illustration, I mean the Mon Tue Wed labels like in this boxplot:

-

Use the second argument of xticks to set the labels:

import numpy as np
import pylab

data = [[np.random.rand(100)] for i in range(3)]
pylab.boxplot(data)
pylab.xticks([1, 2, 3], ['mon', 'tue', 'wed'])

-