On Jul 22, 2010, at 10:07 AM, John Hunter wrote: > On Thu, Jul 22, 2010 at 8:57 AM, Tony S Yu <tsyu80@ > >>> According to backend_bases.FigureCanvas, a renderer attr is not >>> guaranteed either. >>> The Agg* backends rely on get_renderer so that they can get a properly >>> sized renderer on figure resizes, dpi changes, etc. We could handle >>> this on the agg side with a property, or require all canvases to >>> supply get renderer. > > No, this won't work because the sizing information depends on the GUI > window size. Agg adapts the renderer to the GUI window size. So in > GTKAgg we are using the Agg renderer, but GTK is determining the > window size when it is raised. We try to get GTK to produce a canvas > of a fixed size, but cannot guarantee it so we reset the renderer size > in necessary when the canvas is raised. > > JDH
I'm not sure if I understand. Are you talking about responding to window resizing events, or are you saying that Figure.get_height/get_width don't match the window size for some GUI backends? I create the Agg renderer based on Figure.get_height/get_width. If the window is resized, then the layout would definitely change, but you could call `tight_layout` again to adjust subplot spacing (which would create a new Agg renderer based on the new window size). Am I missing something here? Were you thinking I wanted to interactively adapt the spacings? (If that's the case, I wasn't that ambitious.) -Tony ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel