On Sun, Apr 27, 2008 at 12:56 PM, Eric Firing <[EMAIL PROTECTED]> wrote:

>  The plot thickens.  The postscript backend is completely confused by the
> quiver plot.  Try the attached example.


Argg, that was a subtle one -- there was a bug in backend ps which was
exposed only if you are using a path collection with offsets,
transoffset and clippath and cliprect both None.  In that scenario,
the translate in the bind def function was not getting wrapped in a
gsave/grestore pair, which was causing the axes to be drawn in the
wrong place because the translate from the offset remained in effect.
I tried following the draw_markers logic and putting the
gsave/grestore in the ps_cmd, eg in draw_markers Michael writes ijn a
comment:

        ps_cmd = ['/o {', 'gsave', 'newpath', 'translate'] # dont want
the translate to be global

so clearly he was bumping up against the same problem with markers.
For some reason, trying the same thing in the path_collection was not
working for me, so I resorted to the somewhat hackish approach of
forcing _draw_ps to wrap a gsave/grestore if it wasn't getting one
from the cliprect or clippath:

        needwrap = not (clippath or cliprect)
        if needwrap:
            # we need to make sure that there is at least 1
            # save/grestore around each ps write so we'll force it if
            # we're not getting one from the cliprecot or clippath.
            # hackish, yes
            write('gsave\n')

and then

        if needwrap:
            write('grestore\n')

I think there will be cleaner way, but it will need some fresh
eyeballs tomorrow and this will provide a temporary fix.

JDH

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to