adding labels to individual boxplots


Thanks for replying.

Faheem Mitha <faheem@...302...> writes:

The current boxplot function in matplotlib does not appear to support
labels for individual boxplots, if there are several on the same plot.

Do you mean the tick labels on the x axis, or something else?

Yes, I mean the tick labels on the x axis.

I know I can manually add labels, but would prefer not to do so, since
I am trying to automate the process of graph creation as much as

Perhaps I'm not getting what you mean by "automate", but you'll be
writing a script anyway and can easily add the labels after plotting, eg

  setp(gca(), 'xticklabels', ['first', 'second', 'third'])

Yes, using xticklabels works. I can do


On Thu, 19 Jan 2006 21:45:11 +0200, Jouni K Seppanen <jks@...397...> wrote:

from pylab import *
from matplotlib.backends.backend_ps import FigureCanvasPS

fig = Figure()
canvas = FigureCanvasPS(fig)
ax = fig.add_subplot(111)
ax.boxplot([1, 2, 3, 4, 5, 6, 7, 8])
ax.set_xlabel("Test boxplot,")

Thanks. Faheem,