How to see plotly graphs in Pycharm?(如何在 Pycharm 中查看绘图?)
问题描述
我看到以下渲染器可用:
默认渲染器:'browser'可用的渲染器:['plotly_mimetype', 'jupyterlab', 'interact', 'vscode','notebook'、'notebook_connected'、'kaggle'、'azure'、'colab'、'json'、'png'、'jpeg'、'jpg'、'svg'、'pdf'、'浏览器'、火狐"、铬"、铬"、iframe"、iframe_connected"、'狮身人面像画廊']但我不知道如何让 Pycharm 在 IDE 中显示输出,就像我使用 Matplotlib 绘制图表时一样.
如何做到这一点?
这是我使用的代码,来自 plotly 的示例:
fig = go.Figure(数据=[go.Bar(y=[2, 1, 3])],layout_title_text=测试";)图.show()这将打开一个浏览器选项卡以在 Pycharm 调试器中运行时显示图形.
我从一年前看到一个类似的问题,但没有解决方案:
Pycharm
I see the following renderers are available:
Default renderer: 'browser'
Available renderers:
['plotly_mimetype', 'jupyterlab', 'nteract', 'vscode',
'notebook', 'notebook_connected', 'kaggle', 'azure', 'colab',
'json', 'png', 'jpeg', 'jpg', 'svg', 'pdf', 'browser',
'firefox', 'chrome', 'chromium', 'iframe', 'iframe_connected',
'sphinx_gallery']
but I don't see how I can get Pycharm to show the output, in the IDE, like when I do graphs with Matplotlib.
how can this be done?
Edit:
This is the code I use, sample from plotly:
fig = go.Figure(
data=[go.Bar(y=[2, 1, 3])],
layout_title_text="test"
)
fig.show()
This will open a browser tab to show the graph while run in the Pycharm debugger.
Edit2:
I see a similar question, from a year ago, with no solution:
Plotly chart is not displayed in PyCharm
Follow the below steps:
- right click and select "Run file in python console"
- after that browser will be opened with graph output
See screenshot below:
Pycharm
这篇关于如何在 Pycharm 中查看绘图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在 Pycharm 中查看绘图?
基础教程推荐
- 求两个直方图的卷积 2022-01-01
- PANDA VALUE_COUNTS包含GROUP BY之前的所有值 2022-01-01
- 修改列表中的数据帧不起作用 2022-01-01
- 无法导入 Pytorch [WinError 126] 找不到指定的模块 2022-01-01
- 在Python中从Azure BLOB存储中读取文件 2022-01-01
- Plotly:如何设置绘图图形的样式,使其不显示缺失日期的间隙? 2022-01-01
- 在同一图形上绘制Bokeh的烛台和音量条 2022-01-01
- 使用大型矩阵时禁止 Pycharm 输出中的自动换行符 2022-01-01
- PermissionError: pip 从 8.1.1 升级到 8.1.2 2022-01-01
- 包装空间模型 2022-01-01
