Title: imshow intermediate memory usage · Issue #6952 · matplotlib/matplotlib · GitHub
Open Graph Title: imshow intermediate memory usage · Issue #6952 · matplotlib/matplotlib
X Title: imshow intermediate memory usage · Issue #6952 · matplotlib/matplotlib
Description: On my machine, imshow uses 3.5 GB of RAM at peak during its plotting process for a 385 MB array, even if this array is already a float64. Nearly 10x the RAM required for just the data alone. Once the plot is finished, it goes significant...
Open Graph Description: On my machine, imshow uses 3.5 GB of RAM at peak during its plotting process for a 385 MB array, even if this array is already a float64. Nearly 10x the RAM required for just the data alone. Once t...
X Description: On my machine, imshow uses 3.5 GB of RAM at peak during its plotting process for a 385 MB array, even if this array is already a float64. Nearly 10x the RAM required for just the data alone. Once t...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/6952
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"imshow intermediate memory usage","articleBody":"On my machine, imshow uses 3.5 GB of RAM at peak during its plotting process for a 385 MB array, even if this array is already a float64. Nearly 10x the RAM required for just the data alone. Once the plot is finished, it goes significantly. Is this a bug, or is this just how it is?\n\nI cannot simply downsample because I would like to show the user the image at its true size, but allow them to scroll around to different parts via the scrollbars. Is there any approach someone can suggest to do this without having to have 10x the RAM? \n\nHere is a minimal example via pyplot that reproduces this issue exactly; I used task manager to measure the RAM usage.\n\n`import matplotlib.pyplot as plt\nimport numpy as np\n\nimg = np.random.rand(3000, 16024, dtype='float64')\nimgplot = plt.imshow(img)\n\nplt.show()`\n\nPython 2.7 and 3.4\nmatplotlib 1.5.1 (installed via pip)\nUsing tkagg backend. \nWindows 7\n","author":{"url":"https://github.com/LevN0","@type":"Person","name":"LevN0"},"datePublished":"2016-08-18T04:46:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":21},"url":"https://github.com/6952/matplotlib/issues/6952"}
| 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:cd0af277-acee-aa17-6db2-2b644c71c92c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 972A:34F6B9:116FB89:178F7BF:6A521270 |
| html-safe-nonce | a74b359fe3d0ec604dab13961d615f5f6ac4678f3fefb8169e706b75860d3e27 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NzJBOjM0RjZCOToxMTZGQjg5OjE3OEY3QkY6NkE1MjEyNzAiLCJ2aXNpdG9yX2lkIjoiNDgyMzQ4MzgzMjY3MzExMjY4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8c32cfad5ad3a938839979bda4bb4c2771721a2afac33f221b152049b9ccfd57 |
| hovercard-subject-tag | issue:171817009 |
| 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/6952/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2c900b9506549580e6b63b0ef3b8abc5f89d550e8c3b5e1a2a56c8bfcf3622e3/matplotlib/matplotlib/issues/6952 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2c900b9506549580e6b63b0ef3b8abc5f89d550e8c3b5e1a2a56c8bfcf3622e3/matplotlib/matplotlib/issues/6952 |
| og:image:alt | On my machine, imshow uses 3.5 GB of RAM at peak during its plotting process for a 385 MB array, even if this array is already a float64. Nearly 10x the RAM required for just the data alone. Once t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | LevN0 |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width