I am working in Python with TkAgg. I have several plots that I would
like to display on a single figure. The problem is, when I set the
figure size to 12in wide, 6in high (which is perfect for my laptop) the
plots get scrunched up. If I resize the window in which they're
displayed then the plots scrunch up even further. So it appears to me
that the figure size is tied to the window size.
I would like to set the size of the initial window in which the plots
appear and then fix the size of the canvas? frame? figure? (not sure
what I need to fix). I have created a scrollbar on the window to permit
scrolling up and down.
I have attached the Navigation Toolbar to the bottom of the window,
which is where I would like it to stay. So, the plots should scroll up
and down with the toolbar fixed.
My small sample program is attached.
I am using Tk (as opposed to another GUI) as I am generating these plots
from data in SimPy and am using SimGUI to control the model execution
I would greatly appreciate any help!
From: Friedrich Romstedt <friedrichromstedt@gm...> - 2010-03-11 23:47:54
I would suggest that you add the axes with:
axes = figure.add_axes((left, bottom, width, height))
instead of .add_subplot(). I think you have too many subplots, it
seems that the algorithm isn't designed for this. With .add_axes(),
you can add more space.
Note that you have then maybe to call the axes.plot() method directly,
which may be an disadvantage or advantage, depending on you mood :-)
Get latest updates about Open Source Projects, Conferences and News.