Title: WXAgg backend not rendering nicely on retina · Issue #7720 · matplotlib/matplotlib · GitHub
Open Graph Title: WXAgg backend not rendering nicely on retina · Issue #7720 · matplotlib/matplotlib
X Title: WXAgg backend not rendering nicely on retina · Issue #7720 · matplotlib/matplotlib
Description: When embedding a matplotlib plot in a WX.Panel, the figure_canvas is not rendered nicely on a retina display. Increasing the dpi of the figure does not help (it only alters the figure size). Matplotlib version: 2.0.0rc2 (installed with p...
Open Graph Description: When embedding a matplotlib plot in a WX.Panel, the figure_canvas is not rendered nicely on a retina display. Increasing the dpi of the figure does not help (it only alters the figure size). Matplo...
X Description: When embedding a matplotlib plot in a WX.Panel, the figure_canvas is not rendered nicely on a retina display. Increasing the dpi of the figure does not help (it only alters the figure size). Matplo...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/7720
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"WXAgg backend not rendering nicely on retina","articleBody":"When embedding a matplotlib plot in a WX.Panel, the figure_canvas is not rendered nicely on a retina display. Increasing the dpi of the figure does not help (it only alters the figure size).\r\n\r\n\r\n\r\nMatplotlib version: 2.0.0rc2 (installed with pip) (same behaviour as with 1.5.3)\r\nPython version: 2.7.13 (installed with homebrew)\r\nPlatform: OSX (macOS Sierra)\r\n\r\n\r\n**Plotting using standard MacOSX backend (no embedding):**\r\n```\r\nimport matplotlib\r\nmatplotlib.use(\"MacOSX\") #put here explicitly for reference\r\n\r\nfrom numpy import arange, sin, pi\r\nimport matplotlib.pyplot as plt\r\n\r\nfigure = plt.figure()\r\naxes = figure.add_subplot(111)\r\nt = arange(0.0, 3.0, 0.01)\r\ns = sin(2 * pi * t)\r\naxes.plot(t, s)\r\n\r\nplt.show()\r\n```\r\n\u003cimg width=\"752\" alt=\"screenshot_using_macosx_backend\" src=\"https://cloud.githubusercontent.com/assets/1700025/21582563/f920ce6a-d05d-11e6-88e9-d40ea68022b9.png\"\u003e\r\n\r\n\r\n**Plotting using the WXAgg backend (embed inside WX.Panel):**\r\n```\r\nfrom numpy import arange, sin, pi\r\nimport matplotlib\r\nmatplotlib.use('WXAgg')\r\n\r\nfrom matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas\r\nfrom matplotlib.backends.backend_wx import NavigationToolbar2Wx\r\nfrom matplotlib.figure import Figure\r\n\r\nimport wx\r\n\r\nclass CanvasPanel(wx.Panel):\r\n def __init__(self, parent):\r\n wx.Panel.__init__(self, parent)\r\n self.figure = Figure()\r\n self.axes = self.figure.add_subplot(111)\r\n self.canvas = FigureCanvas(self, -1, self.figure)\r\n self.sizer = wx.BoxSizer(wx.VERTICAL)\r\n self.sizer.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.GROW)\r\n self.SetSizer(self.sizer)\r\n self.Fit()\r\n\r\n def draw(self):\r\n t = arange(0.0, 3.0, 0.01)\r\n s = sin(2 * pi * t)\r\n self.axes.plot(t, s)\r\n\r\nif __name__ == \"__main__\":\r\n app = wx.App()\r\n fr = wx.Frame(None, title='test')\r\n panel = CanvasPanel(fr)\r\n panel.draw()\r\n fr.Show()\r\n app.MainLoop()\r\n```\r\n\r\n\u003cimg width=\"684\" alt=\"screenshot_wx_embed\" src=\"https://cloud.githubusercontent.com/assets/1700025/21582566/ff43b1f4-d05d-11e6-8032-7471b5c05d60.png\"\u003e\r\n\r\n\r\nAny workarounds or tips?\r\n","author":{"url":"https://github.com/LtMerlin","@type":"Person","name":"LtMerlin"},"datePublished":"2017-01-01T19:14:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/7720/matplotlib/issues/7720"}
| 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:fdde1678-6c7e-10e9-7618-4bd871b12391 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DA34:290D1F:12E3F4A:19955B2:6A534727 |
| html-safe-nonce | dd384b8b2b2b03d27a5ee50819f69949e1433289119eef8830bdeda76613d146 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQTM0OjI5MEQxRjoxMkUzRjRBOjE5OTU1QjI6NkE1MzQ3MjciLCJ2aXNpdG9yX2lkIjoiNTcyNTE3NjAxODQ4NDAyMTAzMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2f63417bd72262538bba6e6d2f4a1f3d033e77653709691fe958e14afc224d7c |
| hovercard-subject-tag | issue:198278115 |
| 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/7720/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a6ac0927b277d70e91fa7f7ecba1ea0732d133e4b045e1a3ed0a6944e4ae6717/matplotlib/matplotlib/issues/7720 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a6ac0927b277d70e91fa7f7ecba1ea0732d133e4b045e1a3ed0a6944e4ae6717/matplotlib/matplotlib/issues/7720 |
| og:image:alt | When embedding a matplotlib plot in a WX.Panel, the figure_canvas is not rendered nicely on a retina display. Increasing the dpi of the figure does not help (it only alters the figure size). Matplo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | LtMerlin |
| 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