Search code examples
pycharmplotly

How to see plotly graphs in 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


Solution

  • 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:

    enter image description here

    Pycharm