Plotly says it is a web library. Matplotlib does support Wxpython but comparatively, it is too low level. Is there any way to integrate Plotly inside a Wxpython GUI or are there any alternative for it?
Asked
Active
Viewed 1,539 times
1
-
1You can [easily integrate matplotlib in wxpython](https://matplotlib.org/gallery/user_interfaces/embedding_in_wx5_sgskip.html). Plotly in turn is web based. You may create a webbrowser in wx to show plotly output though (probably using something like `wx.html2.WebView`). Something similar has been shown in [this question](https://stackoverflow.com/questions/53570384/plotly-how-to-make-a-standalone-plot-in-a-window/53573039#53573039) for PyQt instead of wx. – ImportanceOfBeingErnest Mar 26 '19 at 22:01
2 Answers
3
You might be able to use Plotly's ability to export plots to images to get the plots into wxPython:
If you need the live plotting though, then you will need to use Webview:
I also see that Plotly can now be used offline, so if you used that plus Webview, it should work.

Mike Driscoll
- 32,629
- 8
- 45
- 88
0
Wxpython webview doesn't support 3-d graphs from plotly.
For 3-d graphs, I used cefpython. It embeds a full chromium browser inside python application. wxpython example can be found here: https://github.com/cztomczak/cefpython/blob/master/examples/wxpython.py.
I used plotly offline, and read the file inside cefpython.

Shubham Chaudhary
- 1,322
- 2
- 18
- 38
-
-
@bs0d it wasn't special to plotly. I used plotly to write files and read them using cefpython as it would read any other html. – Shubham Chaudhary Oct 21 '21 at 07:13