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

Line break for text is not working in Scattergl()

Open simonary opened this issue 4 years ago • 0 comments

Python: 3.9 Plotly: 2.4.2+

from plotly.subplots import make_subplots  
import plotly.graph_objects as go  
  
fig = make_subplots(rows=1, cols=2, subplot_titles=("Using go.Scattergl()", "Using go.Scatter()"))  
  
fig.add_trace(  
    go.Scattergl(x=[1, 2, 3], y=[4, 5, 6], text="This is a<br>line break.", mode='markers+text+lines'),  
    row=1, col=1  
)  
  
fig.add_trace(  
    go.Scatter(x=[20, 30, 40], y=[50, 60, 70], text="This is a<br>line break.", mode='markers+text+lines'),  
    row=1, col=2  
)  
  
fig.update_layout(height=600, width=800)  
fig.write_html("test_gl_linebreak.html")

newplot )

simonary avatar Nov 09 '21 07:11 simonary