Title: The Image downloaded using the "download as png" button is distorted · Issue #5202 · plotly/plotly.js · GitHub
Open Graph Title: The Image downloaded using the "download as png" button is distorted · Issue #5202 · plotly/plotly.js
X Title: The Image downloaded using the "download as png" button is distorted · Issue #5202 · plotly/plotly.js
Description: import numpy as np np.random.seed(123) import plotly.express as px import plotly.subplots as subplots from keras.datasets import mnist # from keras.datasets import fashion_mnist as mnist (X_train, y_train), (X_test, y_test) = mnist.load_...
Open Graph Description: import numpy as np np.random.seed(123) import plotly.express as px import plotly.subplots as subplots from keras.datasets import mnist # from keras.datasets import fashion_mnist as mnist (X_train, ...
X Description: import numpy as np np.random.seed(123) import plotly.express as px import plotly.subplots as subplots from keras.datasets import mnist # from keras.datasets import fashion_mnist as mnist (X_train, ...
Opengraph URL: https://github.com/plotly/plotly.js/issues/5202
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"The Image downloaded using the \"download as png\" button is distorted","articleBody":"```python\r\nimport numpy as np\r\nnp.random.seed(123)\r\n\r\nimport plotly.express as px\r\nimport plotly.subplots as subplots\r\nfrom keras.datasets import mnist\r\n# from keras.datasets import fashion_mnist as mnist\r\n\r\n(X_train, y_train), (X_test, y_test) = mnist.load_data()\r\n\r\n\r\nfig = subplots.make_subplots(rows=2, cols=5)\r\n\r\nfor n, image in enumerate(X_train[:10]):\r\n fig.add_trace(px.imshow(255-image).data[0], row=int(n/5)+1, col=n%5+1)\r\n\r\n\r\nlayout = px.imshow(X_train[0], color_continuous_scale='gray').layout\r\nfig.layout.coloraxis = layout.coloraxis\r\nfig.update_xaxes(**layout.xaxis.to_plotly_json())\r\nfig.update_yaxes(**layout.yaxis.to_plotly_json())\r\nfig.show()\r\n```\r\nthis results in this (screenshot):\r\n\r\n\r\n\r\n\r\ndownload as png results in this:\r\n\r\n\r\nTangential: It is also *way* too complicated to generated a small preview selection of pictures. If there is an easier method please answer this [stack overflow question](https://stackoverflow.com/questions/64268081/creating-a-subplot-of-images-with-plotly)","author":{"url":"https://github.com/FelixBenning","@type":"Person","name":"FelixBenning"},"datePublished":"2020-10-08T19:25:19Z","url":"https://github.com/plotly/plotly.js/issues/5202"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:ba5d0a20-fee9-c6b2-4e64-dcb50d14c369 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A31A:1087D4:2389C51:2F7CBEF:6B019B77 |
| html-safe-nonce | 26b19600bbf1bf8e75a3ece9b28d9054091b90548e4924f906bd670660772500 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzFBOjEwODdENDoyMzg5QzUxOjJGN0NCRUY6NkIwMTlCNzciLCJ2aXNpdG9yX2lkIjoiMTQ0NzExMDg2MTkxNDIxNzMzNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d917e5b778354606d6349de2847fff8d2137579817cdc68657850433d162c032 |
| hovercard-subject-tag | issue:717603033 |
| 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/plotly/plotly.js/5202/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d9fea29b3a630e49f27458b2b6d7b2e8e907613bdd9374ad85dfae8d4ec73d82/plotly/plotly.js/issues/5202 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d9fea29b3a630e49f27458b2b6d7b2e8e907613bdd9374ad85dfae8d4ec73d82/plotly/plotly.js/issues/5202 |
| og:image:alt | import numpy as np np.random.seed(123) import plotly.express as px import plotly.subplots as subplots from keras.datasets import mnist # from keras.datasets import fashion_mnist as mnist (X_train, ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | FelixBenning |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/plotly/plotly.js git https://github.com/plotly/plotly.js.git |
| octolytics-dimension-user_id | 5997976 |
| octolytics-dimension-user_login | plotly |
| octolytics-dimension-repository_id | 45646037 |
| octolytics-dimension-repository_nwo | plotly/plotly.js |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 45646037 |
| octolytics-dimension-repository_network_root_nwo | plotly/plotly.js |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width