On Fri, Aug 15, 2008 at 1:52 PM, Mathieu Leplatre <[EMAIL PROTECTED]> wrote: >> There is a FAQ showing how to do this for tick labels using the >> bounding boxes of the labels. You could do something similar with the >> title bounding box >> >> http://matplotlib.sourceforge.net/doc/html/faq/howto_faq.html#how-do-i-automatically-make-room-for-my-tick-labels >> >> JDH >> > > Thank you very much for pointing me this out. I must confess I hadn't seen it. > > I am trying to modify the given snipplet so that it could work with > something more general like : > > for label in fig.findobj(matplotlib.text.Text): > > Apart from the missing renderer exceptions that are raised, I can't > figure out how to split the resulting union box into left, right, > bottom, top as required by fig.subplots_adjust() > > If this is obvious, I am very sorry to be tiresome... > > Thanks a lot for your help. >
I figured it out, just had to test xmin/ymin < 0.0 and xmax/ymax > 1.0. I could compute easily the new margins values and it works well. *However*, I noticed that the SVG renderer does not take in account the self.fig.subplots_adjust() commands called within on_draw(self, event). The FAQ example mentionned above does not work when invoking matplotlib.use("svg"). I am using matplotlib 0.98.3, it could be a bug ? Thanks for your feedback ! (should I start a new thread ?) ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users