We'd like to set up a set of plots that look something
> like: PPPP PPPP PPPP PPPP PPPP PPPP PPPP PPPP PPPP PPPP
> PPPP PPPP
> hhh s... hhhhh s... hhh s... hhhhhh s.....
> where - each set of Ps is a 4x4 pcolor plot representing
> signal on a 4x4 detector at a particular time. I.e. a 4x4
> array of solid blocks of gray. - h is a histogram - s is
> the left edge of a scatter plot/strip chart
> We have the basic layout, but are missing a few
> If possible, when the window is resized we'd like to: -
> Resize the histogram and scatterplots but not the pcolor
> plots. (After all, there's no detail to zoom into in a
> 4x4 pcolor plot!) - Keep the pcolor plots (Ps) square.
Perry and I have been actively discussing the need for a physical size
Axes, rather than a relative size. This doesn't exist currently, but
might help enable something like what you want -- some axes that
resize dynamically with the figure window and some that don't. The
problem of creating axes where the aspect ratio is preserved even
under figure resizes is important to many people, so hopefully we can
get a working implementation sooner rather than later.
> My first thought was to set up multiple FigureCanvas
> objects and use tk's layout options. But the updating
> then looked funny (and seemed to go slower, though that
> may be my imagination). We're updating the displays at 2
> Hz (for data coming in at 20Hz) and all the plots are
> related, so it's important to update them all at the same
> Any hints would be appreciated.
If you wanted to turn your 4x4 pcolors into images using one means or
another, you could hack something out. The
matplotlib.figure.Figure.figimage command does a raw pixel dump to the
Figure window, which is not resized. You would have to use it
carefully but it should be doable. Eg, create Numerix arrays that
were right pixel dimensions you wanted and set the scalar values of
the various regions using array indexing. Not very elegant, but might
be usable. The tk canvas solution you tried is another good idea, but
I'm not sure how to best handle the synchronous updates problem.
> P.S. when using the TkAgg API, is this the usual idiom
> for turning off axis labels?: yls =
> self.axScatter.get_yticklabels() for yl in yls:
> yl.set_visible(False) I did not find any equivalent to
> the pylab.set command that automatically iterates over
> collections of ticks or labels. No big deal, but I'd
> simplify the code if I could.
I just moved the set/get stuff into the Artist class so you can use it
at the API level. This is not yet in CVS, but will be soon. For now,
the way you do it will work fine, even though it may not be as pithy.