Skip to content

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

Closed

Description

@jkseppan

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.

Activity

  1. mdboom commented on Apr 12, 2013

    @mdboom
    Member

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

  2. jkseppan commented on Apr 13, 2013

    @jkseppan
    MemberAuthor

    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.

  3. tacaswell commented on Aug 17, 2014

    @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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions