Hi, JJ, Thanks for the reply.
On Sat, 2011-09-17 at 23:04 +0900, Jae-Joon Lee wrote: > Adding a patch to an axes does not mean it cannot be drawn outside of > axes. As far as you set (or unset) proper clip box, artists can be > drawn anywhere in the canvas regardless of the axes it belongs to. > Here is an example, > > ax = subplot(111) > > from matplotlib.patches import FancyArrow > p = FancyArrow(0.05, 0.5, 0.2, 0.0, width=0.01, > length_includes_head=False, > head_width=None, head_length=None, > shape='full', overhang=0, > head_starts_at_zero=False, > transform=ax.figure.transFigure, > clip_on=False) > > ax.add_patch(p) OK, clip boxes are new to me, I will read more. Your suggestion seems a bit kludgy for a multi-panel plot like mine, but it looks like it might get the job done. > On Sat, Sep 17, 2011 at 6:10 AM, John Ladasky > <john_lada...@sbcglobal.net> wrote: > > But that isn't my goal here. I want to add lines to the FIGURE, outside > > of any Axes. Does anyone know how to accomplish this? Thanks! > > Not sure what you mean here. I'm still fairly new to the Matplotlib code, but I have some experience with wxPython and its sizers. Making objects work correctly when they are resized often depends on choosing the right coordinate system for scaling. In matplotlib, each Artist has its own coordinate space. It seemed most logical that, for an object that is connected to the whole figure rather than just one of its subplots, it should use the figure's coordinate space. It appears that the "transform" keyword in your sample code accomplishes that, though in a roundabout way. Also, if I understand the structure of a Matplotlib.Artist object correctly, each has a list of Artist children which gets called recursively when one issues a draw command for the parent. Suppose that, after defining my plot, I should delete the one subplot that contains my FancyArrows, which happened to be drawn outside of that subplot's normal clip box? The FancyArrows would be deleted along with the subplot. If defining the object hierarchy correctly is a sample matter of adding an Artist object of the desired type into the object's list of children, I would try this. Given that there are very specific methods like Figure.text(), Figure.add_subplot(), etc., I suspected that it might be more involved than that. These might just be convenience methods. ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA http://p.sf.net/sfu/rim-devcon-copy2 _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users