Performance Question

I am generating a few hundred graphs and doing so takes on

    > the order of about 10-15 minutes. Which seems to me rather
    > slow. When I profile my code it identifies the calls to
    > get_yticklabels and get_xticklabels as taking over 90% of the
    > time. This seems strange but my calls to these functions are
    > merely a sort round about way of setting the font size of the
    > axis tick labels and suppressing the text for the
    > xticklabels. Is there a more efficient and cleaner way to do
    > this? artist.setp(axes.get_yticklabels(), visible=True,
    > fontsize=7) artist.setp(axes.get_xticklabels(),
    > visible=False)

This is a known performance bottleneck. There are two reasons it is
slow. Every tick label is handled as an independent object, when they
in most cases share most of their properties (font size, orientation)
and so could be better handled as a TextCollection, which does not
exist yet. The second reason is that the text layout engine is doing
layout for newline separated strings with an arbitrary rotation for
every tick label, which is almost never used. So some special case
optimizations to handle the no rotation, no newline text instances
(basically just bypass the layout machinery) would help a lot here.

Are you using matplotlib mathtext also, by chance? This slows things
down a bit too, though is better in recent versions.

JDH