From: Pierre GM <pgmdevlist@gm...>  20061216 16:44:42

On Friday 15 December 2006 21:07, Simson Garfinkel wrote: > Hm. thanks for the info. But it's not perfect... I get times in my > formats, but not the dates. Here is the sample code: Yeah, I agree, the situation is far from ideal. Besides, it turns out that there's no deep magic behind have_dates, which is just a way to tell the axis to use AutoDateFormatter. Which we don't need. So: Plot your boxeds with the positions flag: > boxplot([set1, set2],positions=[732659,732660]) > ax = gca() Then use num2date: timefmt = '%b%d%Y' gca().set_xticklabels([num2date(x).strftime(timefmt) for x in gca().get_xticks()]) > Now, how do I get two boxplots on the same plot? Well, just draw two axes. Simson, now that you're more experienced with matplotlib, you should really start speaking python to it. fig = figure() ax1 = fig.add_subplot(121) ax2=fig.add_subplot(122) ax1.boxplot([set1, set2],positions=[732659,732660]) ax2.boxplot([set2, set1],positions=[732659,732660]) ax1.set_xticklabels([num2date(x).strftime(timefmt) for x in ax1.get_xticks()]) ax2.set_xticklabels([num2date(x).strftime(timefmt) for x in ax2.get_xticks()]) 