{"action":"created","issue":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/5679","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/5679/labels{/name}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/5679/comments","events_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/5679/events","html_url":"https://github.com/matplotlib/matplotlib/issues/5679","id":122156814,"number":5679,"title":"Y-axis switches to log scale when an X-axis is shared multiple times.","user":{"login":"breedlun","id":4099759,"avatar_url":"https://avatars.githubusercontent.com/u/4099759?v=3","gravatar_id":"","url":"https://api.github.com/users/breedlun","html_url":"https://github.com/breedlun","followers_url":"https://api.github.com/users/breedlun/followers","following_url":"https://api.github.com/users/breedlun/following{/other_user}","gists_url":"https://api.github.com/users/breedlun/gists{/gist_id}","starred_url":"https://api.github.com/users/breedlun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/breedlun/subscriptions","organizations_url":"https://api.github.com/users/breedlun/orgs","repos_url":"https://api.github.com/users/breedlun/repos","events_url":"https://api.github.com/users/breedlun/events{/privacy}","received_events_url":"https://api.github.com/users/breedlun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-14T23:31:36Z","updated_at":"2015-12-15T01:41:21Z","closed_at":null,"body":"This is a strange one.  If I create a set of axes, and then create a second set of axes that shares its x-axis with the first x-axis, like the following,\r\n\r\n    import matplotlib.pyplot as plt\r\n    fig = plt.figure()\r\n    ax1 = fig.add_axes([0.1,0.1,0.3,0.3])\r\n    ax1.set_yscale('log')\r\n    ax2 = fig.add_axes([0.1,0.4,0.2,0.2], sharex = ax1)\r\n    print ax2.get_yscale()\r\n\r\nthen ``ax2.get_yscale()`` produces ``'linear'`` as expected.  If I create a third set of axes that shares its x-axis with the second x-axis, like the following,\r\n    \r\n    import matplotlib.pyplot as plt\r\n    fig = plt.figure()\r\n    ax1 = fig.add_axes([0.1,0.1,0.3,0.3])\r\n    ax2 = fig.add_axes([0.1,0.4,0.2,0.2], sharex = ax1)\r\n    ax2.set_yscale('log')\r\n    ax3 = fig.add_axes([0.1,0.4,0.2,0.2], sharex = ax2)\r\n    print ax3.get_yscale()\r\n\r\nthen ``ax3.get_yscale()`` produces ``'linear'`` as expected.  If I, instead, create a third set of axes that shares its x-axis with the FIRST x-axis, like the following,\r\n    \r\n    fig = plt.figure()\r\n    ax1 = fig.add_axes([0.1,0.1,0.3,0.3])\r\n    ax2 = fig.add_axes([0.1,0.4,0.2,0.2], sharex = ax1)\r\n    ax2.set_yscale('log')\r\n    ax3 = fig.add_axes([0.1,0.4,0.2,0.2], sharex = ax1)\r\n    print ax3.get_yscale()\r\n\r\nthen ``ax3.get_yscale()`` produces ``'log'``.  I believe the y-axis for the third set of axes should have defaulted to ``'linear'``."},"comment":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/comments/164614433","html_url":"https://github.com/matplotlib/matplotlib/issues/5679#issuecomment-164614433","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/5679","id":164614433,"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-15T01:41:21Z","updated_at":"2015-12-15T01:41:21Z","body":"```python\r\nfig = plt.figure()\r\nax1 = fig.add_axes([0.1,0.1,0.3,0.3])\r\nax2 = fig.add_axes([0.1,0.4,0.2,0.2], sharex = ax1)\r\nax2.set_yscale('log')\r\nax3 = fig.add_axes([0.1,0.4,0.2,0.2], sharex = ax1)\r\nprint(ax3.get_yscale())\r\nprint(ax2 is ax3)\r\n```\r\n\r\ngives\r\n\r\n```python\r\nIn [5]: log\r\nTrue\r\n```\r\n\r\nThis is a 'feature', the second call to `fig.add_axes` is going \"ah, I have that one already no need to create a new one!\" and just gives you back a new ref to `ax2`."}}