Formatting Question...

Hello NG,

    I have a couple of questions regardin a simple app that I have created,
which uses wxPython + mpl. Basically the problem is as follows:

- The user can plot a certain property (let's say velocity) versus time; the
time variable can be a floating number, but it can also be displayed as a
date. As long as the time variable is a float and I don't have more than 2
subplots for every "row" of subplots, everything seems good. But, if I use
"date" as X-variable and I have 2 or more subplots in one row, there is no
more room for all the ticks in one subplot to be displayed correctly (they
overlap one over the other, is a mess).
- The option of using rotated ticks is nice as long as I have only 1
subplot. For more subplots, it looks messy.
- After the user has finished the plot formatting, I create a series of
figures (they are the same as for the layout, but they contain different
data) and I embed them in MS Word or Powerpoint using win32com.

Now, the questions:

1) Based on subplot size (and I don't know how to retrieve a single subplot
size in inches or pixels or whatever), is there a way to calculate the
"best" number of X-ticks that can fit into the X-axis without overlapping? I
am thinking about binding a wx.EVT_SIZE for the displayed figure, but
obviously this will not work for the saved figures (I use Agg to save

2) I have a time interval on the X-axis. If the time interval spans about
5-6 years, I would like to tick every year (say every January, 1) the X-axis
as long as there is enough room to tick them; if there is not enough space,
I would like to tick once every 2 years and put a minor tick between the
major ticks.

3) When I use 2 Y-axes (as in the "auto" legend location does
not consider data on the second axis when it calculates the best legend
position. So I end up with a legend that "stays away" from lines that
belongs on first Y-axis but it overlaps the lines plotted on the second

4) Does anyone know if there is an easy way to fix the two_scales problem
mentioned in a previous thread:


Thank you very much for every idea/suggestion.


"Imagination Is The Only Weapon In The War Against Reality."