{"action":"created","issue":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/5450","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/5450/labels{/name}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/5450/comments","events_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/5450/events","html_url":"https://github.com/matplotlib/matplotlib/pull/5450","id":115910449,"number":5450,"title":"added axes inversion to cla()","user":{"login":"ordirules","id":705366,"avatar_url":"https://avatars.githubusercontent.com/u/705366?v=3","gravatar_id":"","url":"https://api.github.com/users/ordirules","html_url":"https://github.com/ordirules","followers_url":"https://api.github.com/users/ordirules/followers","following_url":"https://api.github.com/users/ordirules/following{/other_user}","gists_url":"https://api.github.com/users/ordirules/gists{/gist_id}","starred_url":"https://api.github.com/users/ordirules/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ordirules/subscriptions","organizations_url":"https://api.github.com/users/ordirules/orgs","repos_url":"https://api.github.com/users/ordirules/repos","events_url":"https://api.github.com/users/ordirules/events{/privacy}","received_events_url":"https://api.github.com/users/ordirules/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/matplotlib/matplotlib/labels/needs_revision","name":"needs_revision","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/12","html_url":"https://github.com/matplotlib/matplotlib/milestones/proposed%20next%20point%20release%20(2.1)","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/12/labels","id":534144,"number":12,"title":"proposed next point release (2.1)","description":"Next feature release.\r\n\r\nBig ticket items:\r\n\r\n - MEP 22/27\r\n - traitlets","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":434,"closed_issues":266,"state":"open","created_at":"2014-01-13T03:21:09Z","updated_at":"2015-12-23T22:48:18Z","due_on":null,"closed_at":null},"comments":11,"created_at":"2015-11-09T16:16:21Z","updated_at":"2015-12-24T00:14:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/5450","html_url":"https://github.com/matplotlib/matplotlib/pull/5450","diff_url":"https://github.com/matplotlib/matplotlib/pull/5450.diff","patch_url":"https://github.com/matplotlib/matplotlib/pull/5450.patch"},"body":"This has been bothering me a little. When axes are cleared, the x/y-axis should have the positive direction consistently point the same way.\r\n\r\nHere is sample code:\r\n```python\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimg = np.random.random((100,100))\r\nplt.imshow(img)\r\nplt.cla()\r\nx = np.linspace(0,2*np.pi,100)\r\nplt.plot(x,np.cos(x))\r\n```\r\n\r\nUpon clearing, the yaxis is inverted. This is because plotting the image inverts the y axis since the origin is located in the upper left hand corner. If not image was previously plotted to the figure, the y axis would not have been inverted. I have tested it and it works nicely.\r\n\r\nWhat do you think? Is this worth adding? As a user, I can definitely say this is a feature that would greatly simplify my life.\r\n\r\nI'm pinging @fariza and @OceanWolf since they reviewed a pull request touching similar functions. (@Oceanwolf, still have not done the div by zero checking but will later)\r\n\r\nthanks for reading!"},"comment":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/comments/167012389","html_url":"https://github.com/matplotlib/matplotlib/pull/5450#issuecomment-167012389","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/5450","id":167012389,"user":{"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},"created_at":"2015-12-24T00:14:27Z","updated_at":"2015-12-24T00:14:27Z","body":"huh, we are testing some interesting projections in the test suite that do not liken `set_*lim`.\r\n\r\n@ordirules just made the connection that I know you in other contexts, sorry about that."}}