Title: Same environment but different results with saving/loading a pickled figure · Issue #13586 · matplotlib/matplotlib · GitHub
Open Graph Title: Same environment but different results with saving/loading a pickled figure · Issue #13586 · matplotlib/matplotlib
X Title: Same environment but different results with saving/loading a pickled figure · Issue #13586 · matplotlib/matplotlib
Description: I faced an issue regarding how to load a figure after pickling it. I don't know if this might be a bug (in VSCode), the very nature of the package or other things. The saving process of the figure goes smoothly. Code for reference: with ...
Open Graph Description: I faced an issue regarding how to load a figure after pickling it. I don't know if this might be a bug (in VSCode), the very nature of the package or other things. The saving process of the figure ...
X Description: I faced an issue regarding how to load a figure after pickling it. I don't know if this might be a bug (in VSCode), the very nature of the package or other things. The saving process of the fig...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/13586
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Same environment but different results with saving/loading a pickled figure","articleBody":"I faced an issue regarding how to load a figure after pickling it. I don't know if this might be a bug (in VSCode), the very nature of the package or other things. \r\n\r\nThe saving process of the figure goes smoothly. Code for reference: \r\n\r\n```\r\nwith open('cdImg.pickle', 'wb') as f:\r\n pickle.dump(f1, f)\r\n```\r\n However, when I load the figure in **Ipython** with the following code: \r\n\r\n In [1]: import pickle\r\n \r\n In [2]: import matplotlib.pyplot as plt\r\n \r\n In [3]: candleFig = pickle.load(open('cdImg.pickle', 'rb'))\r\n \r\n In [4]: candleFig.show() ### Here plt.show() also works. \r\n\r\nThe image shows perfectly. Using that same code in **VSCode** (**within the same env; hence, same python and package versions**) I don't get the figure, but the program executes perfectly and without any error.\r\n\r\nIn contrast, if I execute the following in VSCode: \r\n\r\n ```\r\nimport pickle\r\nimport matplotlib.pyplot as plt\r\n\r\ndef loadImage():\r\n \r\n candleFig = pickle.load(open('cdImg.pickle', 'rb'))\r\n \r\n plt.show() ### In the IPython example it was: candleFig.show()\r\n \r\nif __name__ == '__main__':\r\n \r\n loadImage()\r\n```\r\nIt loads the image perfectly. Notice the change from `candleFig` in ipython to `plt.show()` in VSCode. \r\n\r\n¿Is there anything I'm missing about the candleFig.show() not working in VSCode? \r\n\r\nMatplotlib version: 3.0.2\r\nPython version: 3.6.8\r\nIpython: 6.4.0\r\nPickle version: 4.0\r\n","author":{"url":"https://github.com/Eriz11","@type":"Person","name":"Eriz11"},"datePublished":"2019-03-04T19:49:08.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/13586/matplotlib/issues/13586"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9cc049ce-3ef6-6311-96c3-f692fbe4542a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A4EC:27E2F7:6F804D:94F572:6A530390 |
| html-safe-nonce | 97471e7c973edfa1e88ba55bdc7ae98eab896e17dc5d40d58047a3dab51eccd2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNEVDOjI3RTJGNzo2RjgwNEQ6OTRGNTcyOjZBNTMwMzkwIiwidmlzaXRvcl9pZCI6Ijg1NjIxNTExNTA0MjU2NzA1NDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f5be45b122bec25eb80d194ec7200bd4cfaec323ac37cae135adfedec0203229 |
| hovercard-subject-tag | issue:416964333 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/13586/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ec90b0f1651493d411747bdd435a271be1dfee80c28bcdf8853399af9422f8ff/matplotlib/matplotlib/issues/13586 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ec90b0f1651493d411747bdd435a271be1dfee80c28bcdf8853399af9422f8ff/matplotlib/matplotlib/issues/13586 |
| og:image:alt | I faced an issue regarding how to load a figure after pickling it. I don't know if this might be a bug (in VSCode), the very nature of the package or other things. The saving process of the figure ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Eriz11 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width