import plotly.graph_objects as go
g = go.FigureWidget(make_subplots(rows=1,cols=1))
g.update_layout(annotations=[dict(text='my text')]) #plus any other parameters
string = "These are orange"
myText = string+'<br>'+ '-'*len(string)
绘图:
代码:
^{pr2}$
绘图源:使用help(fig.layout):
text
| Sets the text associated with this annotation.
| Plotly uses a subset of HTML tags to do things
| like newline (<br>), bold (<b></b>), italics
| (<i></i>), hyperlinks (<a href='...'></a>).
| Tags <em>, <sup>, <sub> <span> are also
| supported.
Plotly使用HTML标记的子集来格式化文本,如粗体
'<b></b>'
和斜体'<i></i>'
。唉,'<u></u>'
目前似乎还没有包括在内。但是linebreak包含在中,因此您可以像这样做一些小的修改:绘图:
代码:
^{pr2}$绘图源:使用
help(fig.layout)
:相关问题 更多 >
编程相关推荐