Path collection filling/stroking logic is different from the usual in the pdf backend #1412

Closed
jkseppan opened this Issue Oct 18, 2012 · 3 comments

Projects

None yet

4 participants

@jkseppan
Member

Reported in: http://permalink.gmane.org/gmane.comp.python.matplotlib.general/32019

In the pdf backend, draw_path_collection contains

    filled = len(facecolors)
    stroked = len(edgecolors)

so it fills if any fill color is specified, and strokes if any stroke color is specified. This is not the same logic as for other objects. Specifically, a linewidth of zero should cause the paths not to be stroked (because in pdf, a zero-width line is a line of some device-specific minimum width, whereas in agg a zero-width line is a line not drawn).

I think the code needs to make the filled/stroked decisions when creating the XObjects, so the current _iter_collection_raw_paths method is not quite sufficient.

@mdboom
Member
mdboom commented Apr 12, 2013

I think #1860 fixes a lot of this. Do you agree? If so, maybe we should close this.

@jkseppan
Member

Yes, #1860 looks like essentially the same issue. Does it fix the specific problem with line width zero? (I can't test myself right now.)

Michael Droettboom notifications@github.com wrote:

I think #1860 fixes a lot of this. Do you agree? If so, maybe we should close this.


Reply to this email directly or view it on GitHub.

@dmcdougall dmcdougall was assigned Jun 16, 2013
@tacaswell
Member

Closing this as we have at least one other issue related to special casing zero-width lines in pdfs (#2910), it sounds like the bulk of this is already fixed, and this is over a year old.

@jkseppan Please re-open if you disagree.

@tacaswell tacaswell closed this Aug 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment