boxplot

I want multiple boxes on a single plot, with one box per day. Take a look at how I've done it with just plot() and some error bars...

daily_bandwidth.pdf (50.6 KB)

···

On Dec 16, 2006, at 12:02 PM, Pierre GM wrote:

I'd love to speak python to it. But it's harder when all of the
examples are in matlab...

:slight_smile:
Well, please have a look to pythonic_matplotlib.py in your examples folder.

fig = figure()
ax1 = fig.add_subplot(121)
ax2=fig.add_subplot(122)

Hm. I'll need to figure out why these two subplots appear on the same
axis.

What do you mean ? You want two plots on a figure, or two figures?
You want one plot in the topleft corner, one in hte bottom right ? You can do
that as well, just tell matplotlib where to plot the axes (a bit of
terminology here: an axes is a box in your figure, in which you will draw a
subplot).

I want multiple boxes on a single plot, with one box per day. Take a
look at how I've done it with just plot() and some error bars...

I'm still not sure I understand where the problem is:
You want several boxes in a plot ?
Something along the lines of what I already sent you ?

boxplot([set1, set2],positions=[732659,732660])

Then once again, just construct of sequences of sets, a sequence of dates (as
ordinals), and use something like:
boxplot(setsequence, positions=datesequence).

Alternatively, follow the boxplot_demo example.

Then, you'll have to use the trick I sent earlier
gca().set_xticklabels([num2date(x).strftime(fmt) for x in
gca().get_xticklabels()])