Skip to content

to_html method does not output a renderable HTML string in Jupyter #3104

@jonsnowseven

Description

@jonsnowseven

Hello.

I am having an issue rendering the HTML content outputted from to_html method.

Versions

  • Python 3.8
  • Plotly 4.14.3

Code to reproduce

import plotly.express as px
from IPython.display import HTML

df = px.data.iris()
fig = px.scatter(df, x="sepal_width", y="sepal_length", color="species")
HTML(fig.to_html())

Output

image

Browser page inspection (from Brave)

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions