{"action":"created","issue":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/2035","repository_url":"https://api.github.com/repos/matplotlib/matplotlib","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/2035/labels{/name}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/2035/comments","events_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/2035/events","html_url":"https://github.com/matplotlib/matplotlib/issues/2035","id":14557177,"node_id":"MDU6SXNzdWUxNDU1NzE3Nw==","number":2035,"title":"legend marker update bug","user":{"login":"gregorio-bastardo","id":4487146,"node_id":"MDQ6VXNlcjQ0ODcxNDY=","avatar_url":"https://avatars0.githubusercontent.com/u/4487146?v=4","gravatar_id":"","url":"https://api.github.com/users/gregorio-bastardo","html_url":"https://github.com/gregorio-bastardo","followers_url":"https://api.github.com/users/gregorio-bastardo/followers","following_url":"https://api.github.com/users/gregorio-bastardo/following{/other_user}","gists_url":"https://api.github.com/users/gregorio-bastardo/gists{/gist_id}","starred_url":"https://api.github.com/users/gregorio-bastardo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregorio-bastardo/subscriptions","organizations_url":"https://api.github.com/users/gregorio-bastardo/orgs","repos_url":"https://api.github.com/users/gregorio-bastardo/repos","events_url":"https://api.github.com/users/gregorio-bastardo/events{/privacy}","received_events_url":"https://api.github.com/users/gregorio-bastardo/received_events","type":"User","site_admin":false},"labels":[{"id":116795,"node_id":"MDU6TGFiZWwxMTY3OTU=","url":"https://api.github.com/repos/matplotlib/matplotlib/labels/confirmed%20bug","name":"confirmed bug","color":"444444","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/25","html_url":"https://github.com/matplotlib/matplotlib/milestone/25","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/25/labels","id":2189521,"node_id":"MDk6TWlsZXN0b25lMjE4OTUyMQ==","number":25,"title":"needs sorting","description":"Milestone that was used for working towards v2.2.\r\n\r\nThese issues need to be sorted between v3.0 (new features, non-critical bug fis), v2.2.1 (regressions and critical bug fixes), v2.2-doc (prose and example changes only).","creator":{"login":"tacaswell","id":199813,"node_id":"MDQ6VXNlcjE5OTgxMw==","avatar_url":"https://avatars3.githubusercontent.com/u/199813?v=4","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":634,"closed_issues":55,"state":"open","created_at":"2016-12-11T20:54:18Z","updated_at":"2018-11-03T17:55:15Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2013-05-21T08:44:59Z","updated_at":"2018-11-06T22:16:46Z","closed_at":null,"author_association":"NONE","body":"When a line object is added to the legend _without marker_, the update works fine both on data and legend line, but _with marker_ it does not refresh the legend line's marker:\n\n<pre><code class=\"python\">\nimport matplotlib.pyplot as plt\n\nfig = plt.figure()\nax = fig.add_subplot(111)\nline, = ax.plot(range(10), range(10))\n\n# uncomment next line to reproduce bug\n# line.set_marker('d')\n\nlegend = ax.legend([line], ['foo'])\nlegend_line, = legend.get_lines()\nfig.show()\nraw_input('press enter to clear marker')\nline.set_marker('')\nlegend_line.set_marker('')\nfig.canvas.draw()\nraw_input('press enter to set marker')\nline.set_marker('d')\nlegend_line.set_marker('d')\nfig.canvas.draw()\nraw_input('press enter to exit')\n \n</code></pre>\n\n\nI understand that lines and markers are drawn separately to support special legend patterns, but this is somehow not the case when line is originally added to the legend _without marker_. Please align legend line and marker property updates.\n\npython 2.7.4 win32\nmatplotlib 1.2.1\n\noriginally reported on mpl-users:\nhttp://matplotlib.1069221.n5.nabble.com/legend-marker-update-problem-tc41070.html\n"},"comment":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/comments/436429100","html_url":"https://github.com/matplotlib/matplotlib/issues/2035#issuecomment-436429100","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/2035","id":436429100,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNjQyOTEwMA==","user":{"login":"ImportanceOfBeingErnest","id":23121882,"node_id":"MDQ6VXNlcjIzMTIxODgy","avatar_url":"https://avatars2.githubusercontent.com/u/23121882?v=4","gravatar_id":"","url":"https://api.github.com/users/ImportanceOfBeingErnest","html_url":"https://github.com/ImportanceOfBeingErnest","followers_url":"https://api.github.com/users/ImportanceOfBeingErnest/followers","following_url":"https://api.github.com/users/ImportanceOfBeingErnest/following{/other_user}","gists_url":"https://api.github.com/users/ImportanceOfBeingErnest/gists{/gist_id}","starred_url":"https://api.github.com/users/ImportanceOfBeingErnest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ImportanceOfBeingErnest/subscriptions","organizations_url":"https://api.github.com/users/ImportanceOfBeingErnest/orgs","repos_url":"https://api.github.com/users/ImportanceOfBeingErnest/repos","events_url":"https://api.github.com/users/ImportanceOfBeingErnest/events{/privacy}","received_events_url":"https://api.github.com/users/ImportanceOfBeingErnest/received_events","type":"User","site_admin":false},"created_at":"2018-11-06T22:16:46Z","updated_at":"2018-11-06T22:16:46Z","author_association":"CONTRIBUTOR","body":"I suppose this would be fixed by https://github.com/matplotlib/matplotlib/pull/11358, which is still work in progress. \r\n\r\nIf you are really in desperate need to do the manipulation without going through the legend creation (again), you may crawl your way through the packers and set the colors of the artists directly.\r\n\r\n```\r\nimport matplotlib.pyplot as plt\r\nfig,ax=plt.subplots()\r\n\r\nax.plot([0,1],[0,1],'o-' )\r\nleg=ax.legend((1,))\r\n\r\nc = leg.get_children()[0].get_children()[1].get_children()[0].get_children()[0].get_children()[0]\r\nfor a in c.get_children():\r\n    a.set_color('k')\r\nplt.show()\r\n```"}}
{"actor":{"display_login":"ImportanceOfBeingErnest"}}