plotly.py icon indicating copy to clipboard operation
plotly.py copied to clipboard

Legend with latex displays wrong in jupyter lab

Open Dranikf opened this issue 3 years ago • 0 comments

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?

Dranikf avatar Jun 09 '22 09:06 Dranikf