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 中查看绘图?


基础教程推荐
- 究竟什么是“容器"?在蟒蛇?(以及所有的 python 容器类型是什么?) 2022-01-01
- 在 Django Admin 中使用内联 OneToOneField 2022-01-01
- Python,确定字符串是否应转换为 Int 或 Float 2022-01-01
- 比较两个文本文件以找出差异并将它们输出到新的文本文件 2022-01-01
- 在 Python 中将货币解析为数字 2022-01-01
- kivy 应用程序中的一个简单网页作为小部件 2022-01-01
- Python 中是否有任何支持将长字符串转储为块文字或折叠块的 yaml 库? 2022-01-01
- Kivy 使用 opencv.调整图像大小 2022-01-01
- 对多索引数据帧的列进行排序 2022-01-01
- matplotlib 设置 yaxis 标签大小 2022-01-01