Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from PyQt5.QtWebKitWidgets import QWebView
- import plotly
- import plotly.graph_objs as go
- x1 = [10, 3, 4, 5, 20, 4, 3]
- trace1 = go.Box(
- x = x1)
- layout = go.Layout(
- showlegend = True)
- data = [trace1]
- fig = go.Figure(data=data, layout = layout)
- fn = '/home/matteo/plot.html'
- plotly.offline.plot(fig, filename = fn, auto_open = False)
- view = QWebView()
- view.load(QUrl.fromLocalFile(fn))
- view.show()
Advertisement
Add Comment
Please, Sign In to add comment