{"action":"created","issue":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4469","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4469/labels{/name}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4469/comments","events_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4469/events","html_url":"https://github.com/matplotlib/matplotlib/issues/4469","id":80655302,"number":4469,"title":"Incorrect hatching in legend for PDF backend","user":{"login":"jpallister","id":1574422,"avatar_url":"https://avatars.githubusercontent.com/u/1574422?v=3","gravatar_id":"","url":"https://api.github.com/users/jpallister","html_url":"https://github.com/jpallister","followers_url":"https://api.github.com/users/jpallister/followers","following_url":"https://api.github.com/users/jpallister/following{/other_user}","gists_url":"https://api.github.com/users/jpallister/gists{/gist_id}","starred_url":"https://api.github.com/users/jpallister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpallister/subscriptions","organizations_url":"https://api.github.com/users/jpallister/orgs","repos_url":"https://api.github.com/users/jpallister/repos","events_url":"https://api.github.com/users/jpallister/events{/privacy}","received_events_url":"https://api.github.com/users/jpallister/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/matplotlib/matplotlib/labels/backend/pdf","name":"backend/pdf","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/18","html_url":"https://github.com/matplotlib/matplotlib/milestones/next%20point%20release","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/18/labels","id":970105,"number":18,"title":"next point release","description":"Next minor release.","creator":{"login":"tacaswell","id":199813,"avatar_url":"https://avatars.githubusercontent.com/u/199813?v=3","gravatar_id":"","url":"https://api.github.com/users/tacaswell","html_url":"https://github.com/tacaswell","followers_url":"https://api.github.com/users/tacaswell/followers","following_url":"https://api.github.com/users/tacaswell/following{/other_user}","gists_url":"https://api.github.com/users/tacaswell/gists{/gist_id}","starred_url":"https://api.github.com/users/tacaswell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tacaswell/subscriptions","organizations_url":"https://api.github.com/users/tacaswell/orgs","repos_url":"https://api.github.com/users/tacaswell/repos","events_url":"https://api.github.com/users/tacaswell/events{/privacy}","received_events_url":"https://api.github.com/users/tacaswell/received_events","type":"User","site_admin":false},"open_issues":199,"closed_issues":149,"state":"open","created_at":"2015-02-07T21:22:30Z","updated_at":"2015-05-25T23:16:04Z","due_on":"2015-07-06T04:00:00Z","closed_at":null},"comments":3,"created_at":"2015-05-25T20:22:18Z","updated_at":"2015-05-25T23:41:55Z","closed_at":null,"body":"When using hatching in a legend, the PDF backend does not draw the hatching if the previous label is empty:\r\n\r\n    from matplotlib import pyplot as plt\r\n\r\n    fig = plt.figure()\r\n\r\n    a = plt.Rectangle([0,0], 0, 0, facecolor=\"green\", hatch=\"//\")\r\n    b = plt.Rectangle([0,0], 0, 0, facecolor=\"blue\", hatch=\"//\")\r\n\r\n    fig.legend([a,b,a,b], [\"\",\"\",\"\",\"\"])\r\n\r\n    plt.savefig(\"test.pdf\")\r\n    plt.show()\r\n\r\nThe displayed legend (from plt.show) is:\r\n![image](https://cloud.githubusercontent.com/assets/1574422/7801867/56b5d5fc-0323-11e5-95c2-8666abcf977e.png)\r\n\r\nThe legend saved in the PDF is:\r\n![image](https://cloud.githubusercontent.com/assets/1574422/7801873/9574f94e-0323-11e5-900e-00c742cc2129.png)\r\n\r\nIf one of the labels is non-empty:\r\n\r\n    fig.legend([a,b,a,b], [\"\",\"\",\"X\",\"\"])\r\n\r\nthe following hatching is displayed correctly\r\n![image](https://cloud.githubusercontent.com/assets/1574422/7801882/e0c7a2f2-0323-11e5-82d4-56a9b7675152.png)\r\n"},"comment":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/comments/105337360","html_url":"https://github.com/matplotlib/matplotlib/issues/4469#issuecomment-105337360","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4469","id":105337360,"user":{"login":"jpallister","id":1574422,"avatar_url":"https://avatars.githubusercontent.com/u/1574422?v=3","gravatar_id":"","url":"https://api.github.com/users/jpallister","html_url":"https://github.com/jpallister","followers_url":"https://api.github.com/users/jpallister/followers","following_url":"https://api.github.com/users/jpallister/following{/other_user}","gists_url":"https://api.github.com/users/jpallister/gists{/gist_id}","starred_url":"https://api.github.com/users/jpallister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpallister/subscriptions","organizations_url":"https://api.github.com/users/jpallister/orgs","repos_url":"https://api.github.com/users/jpallister/repos","events_url":"https://api.github.com/users/jpallister/events{/privacy}","received_events_url":"https://api.github.com/users/jpallister/received_events","type":"User","site_admin":false},"created_at":"2015-05-25T23:41:55Z","updated_at":"2015-05-25T23:41:55Z","body":"The following commit fixes the issue in this case:\r\n  232c50d9f54e4817413023e15bb5669d5ddd1563\r\n\r\nHowever, I don't know enough to say whether this is the right thing to do. The problem does seem to be the hatch pattern is not reapplied in the PDF backend though."}}