{"action":"created","issue":{"url":"https://api.github.com/repos/spyder-ide/spyder/issues/1651","labels_url":"https://api.github.com/repos/spyder-ide/spyder/issues/1651/labels{/name}","comments_url":"https://api.github.com/repos/spyder-ide/spyder/issues/1651/comments","events_url":"https://api.github.com/repos/spyder-ide/spyder/issues/1651/events","html_url":"https://github.com/spyder-ide/spyder/issues/1651","id":57977100,"number":1651,"title":"TkAgg backend in matplotlib alters the requested figure size","user":{"login":"spyder-issues-migrator","id":11021581,"avatar_url":"https://avatars.githubusercontent.com/u/11021581?v=3","gravatar_id":"","url":"https://api.github.com/users/spyder-issues-migrator","html_url":"https://github.com/spyder-issues-migrator","followers_url":"https://api.github.com/users/spyder-issues-migrator/followers","following_url":"https://api.github.com/users/spyder-issues-migrator/following{/other_user}","gists_url":"https://api.github.com/users/spyder-issues-migrator/gists{/gist_id}","starred_url":"https://api.github.com/users/spyder-issues-migrator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spyder-issues-migrator/subscriptions","organizations_url":"https://api.github.com/users/spyder-issues-migrator/orgs","repos_url":"https://api.github.com/users/spyder-issues-migrator/repos","events_url":"https://api.github.com/users/spyder-issues-migrator/events{/privacy}","received_events_url":"https://api.github.com/users/spyder-issues-migrator/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spyder-ide/spyder/labels/1%20star","name":"1 star","color":"fef2c0"},{"url":"https://api.github.com/repos/spyder-ide/spyder/labels/Bug","name":"Bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-17T20:26:34Z","updated_at":"2015-12-16T04:58:31Z","closed_at":null,"body":"_From [breed...@gmail.com](https://code.google.com/u/105348566576685241380/) on 2013-11-22T21:54:42Z_\n\nSpyder Version:  2.2.5\r\nPython Version:  2.7.5\r\nQt Version    :  4.8.5, PyQt4 (API v2) 4.10.3 on Darwin\r\npyflakes >=0.5.0:  0.5.0 (OK)\r\npep8 >=0.6      :  1.4.6 (OK)\r\nIPython >=0.13  :  1.1.0 (OK)\r\nrope >=0.9.2    :  0.9.4 (OK)\r\nsphinx >=0.6.6  :  1.1.3 (OK)\r\nmatplotlib >=1.0:  1.3.0 (OK)\r\nsympy >=0.7.0   :  0.7.3 (OK)\r\npylint >=0.25   :  1.0.0 (OK) \n\nWhat steps will reproduce the problem?\n\n 1. Go to Preferences -> Console -> External Modules\r\n2. Change Matplotlib GUI backend to 'TkAgg'\r\n3. >fig = plt.figure(figsize = [6.1, 4.7])\r\n4. >print fig.get_size_inches() What is the expected output? What do you see instead? I expect the figure size to be [6.1, 4.7].  Instead it is [6.275, 4.875]. \n\nPlease provide any additional information below\n\n. The problem does not occur when I use the 'MacOSX' backend or the 'Qt4Agg' backend.  (I would switch to one of these, but I cannot figure out how to make those backends display the figure on top of all other windows.  See the following post for more info: http://stackoverflow.com/questions/20025077/how-do-i-display-a-matplotlib-figure-window-on-top-of-all-other-windows-in-spyde/20037286#20037286 )\r\n\r\nI almost posted this on the matplotlib github website, but then I called python from the command line, set the backend to 'TkAgg', created a figure with dimensions [6.1, 4.7], and I got a figure size of [6.1, 4.7].  Thus, the problem appears to be with Spyder.\n\n_Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1651_"},"comment":{"url":"https://api.github.com/repos/spyder-ide/spyder/issues/comments/164995738","html_url":"https://github.com/spyder-ide/spyder/issues/1651#issuecomment-164995738","issue_url":"https://api.github.com/repos/spyder-ide/spyder/issues/1651","id":164995738,"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},"created_at":"2015-12-16T04:58:31Z","updated_at":"2015-12-16T04:58:31Z","body":"Has there been any progress on this issue?  I just confirmed that the problem still exists with Spyder 2.3.8 and matplotlib 1.5.0.  Here is the code I used:\r\n\r\n    import matplotlib.pyplot as plt\r\n    fig = plt.figure()\r\n    print fig.get_size_inches()\r\n    fig.set_size_inches([2,2], forward = True)\r\n    fig.canvas.draw()\r\n    print fig.get_size_inches()\r\n    plt.savefig('reduce1.png')\r\n    fig.set_size_inches([8,8], forward = True)\r\n    fig.canvas.draw()\r\n    print fig.get_size_inches()\r\n    plt.savefig('increase1.png')\r\n\r\nWhen I run this straight from the terminal, I get \r\n\r\n    [ 8.  6.]\r\n    [ 2.  2.]\r\n    [ 8.  8.]\r\n\r\nas expected.  When I run the exact same code from spyder, I get\r\n\r\n    [ 8.  6.]\r\n    [ 2.  2.]\r\n    [ 8.     7.475]\r\n\r\nThus, it appears that spyder will not let me increase the figure size to 8\" by 8\".  I have even confirmed that the png files have different heights depending on whether I run the script in the terminal or from spyder.  When I switch to the Qt4Agg backend, the problem goes away."}}