fixing figure size on wxpython app

Hi all,

I’m developing an app for structural geology called OenStereo (
www.igc.usp.br/openstereo), using matplotlib and wxpython.

So far, I’m really happy with the results, but there is still one thing annoying me: when I save the plots (using the save icon in the NavigationToolbar),

the resulting figure size is determined by the size of the window. Can I set this to a fixed value (like 15cm)?

this is a part of the code where I create the figure:

#initialize the figure and canvas

self.stereoFigure = Figure(figsize=(4,4),facecolor=‘white’)

self.stereoCanvas = FigureCanvas(self, -1, self.stereoFigure)

self.toolbar = VMToolbar(self.stereoCanvas)

self.stereoCanvas.mpl_connect(“motion_notify_event”, self.OnMove)

#initialize the plot area

self.plotaxes = self.stereoFigure.add_axes([0.01, 0.01, 0.6, 0.98], clip_on=‘True’,xlim=(-1.1,1.2), ylim=(-1.15,1.15), adjustable=‘box’,autoscale_on=‘False’,label=‘stereo’)

self.plotaxes.set_axis_off()

self.plotaxes.set_aspect(aspect=‘equal’, adjustable=None, anchor=‘W’)

best

Carlos

···


Prof. Carlos Henrique Grohmann - Geologist D.Sc.
Institute of Geosciences - Univ. of São Paulo, Brazil
http://www.igc.usp.br/pessoais/guano

http://lattes.cnpq.br/5846052449613692
Linux User #89721


Can’t stop the signal.