Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitceeaf7b

Browse files
author
“mahdis-z”
committed
final revision
1 parentb9700e6 commitceeaf7b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

‎python/hover-text-and-formatting.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ This template string can include `variables` in %{variable} format, `numbers` in
111111
Hovertemplate customize the tooltip text vs.[texttemplate](https://plot.ly/python/reference/#pie-texttemplate) which customizes the text that appears on your chart.
112112

113113
```python
114-
import plotly.graph_objsas go
115-
import plotly.ioas pio
114+
import plotly.graph_objectsas go
116115

117116
fig= go.Figure(go.Scatter(
118117
x= [1,2,3,4,5],
@@ -130,9 +129,7 @@ fig.add_trace(go.Scatter(
130129
hovertemplate='Price: %{y:$.2f}<extra></extra>',
131130
showlegend=False))
132131

133-
fig.update_layout(
134-
title="Set hover text with hovertemplate",
135-
template= pio.templates['plotly'])
132+
fig.update_layout(title="Set hover text with hovertemplate")
136133

137134
fig.show()
138135
```
@@ -152,7 +149,7 @@ fig.show()
152149
```
153150

154151
###Advanced Hover Template
155-
The following example shows how to format hover template.[Here](https://plot.ly/python/v3/hover-text-and-formatting/#dash-example) is an example to see how to formathovetemplate in Dash.
152+
The following example shows how to format hover template.[Here](https://plot.ly/python/v3/hover-text-and-formatting/#dash-example) is an example to see how to formathovertemplate in Dash.
156153

157154
```python
158155
import plotly.graph_objectsas go

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp