Skip to content

Legend with latex displays wrong in jupyter lab #3768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
fedorkobak opened this issue Jun 9, 2022 · 1 comment
Open

Legend with latex displays wrong in jupyter lab #3768

fedorkobak opened this issue Jun 9, 2022 · 1 comment
Assignees
Labels
bug something broken P3 backlog

Comments

@fedorkobak
Copy link

I need to use latex notation in legend of the plot, but it works wrong (at least in jupyter lab). For example:

import plotly.graph_objects as go

fig = go.Figure()

fig.add_trace(go.Scatter(
    x=[1, 2, 3, 4, 5],
    y=[1, 2, 3, 4, 5],
    name="$hello$"
))

fig.add_trace(go.Scatter(
    x=[1, 2, 3, 4, 5],
    y=[5, 4, 3, 2, 1],
    name="$world$"
))

fig.show()

Will show something like this:
newplot(1)

As you can see, the legend is cropped on the right. Is it any way to fix it?

@moble
Copy link

moble commented Apr 6, 2023

I'm guessing this issue is coming from the underlying plotly.js library, which is running into a bug in Firefox. See this issue. The result would probably render correctly in Chrome or Safari.

@gvwilson gvwilson added P3 backlog bug something broken labels Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P3 backlog
Projects
None yet
Development

No branches or pull requests

4 participants