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

Commit3a61410

Browse files
authored
Merge pull request#214 from plotly/itemsizing_legend
itemsizing
2 parentsf831b7b +023edca commit3a61410

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

‎python/legend.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,32 @@ fig.update_layout(
217217

218218
fig.show()
219219
```
220+
###Size of Legend Items
220221

222+
In this example[itemsizing](https://plot.ly/python/reference/#layout-legend-itemsizing) attribute determines the legend items symbols remain constant, regardless of how tiny/huge the bubbles would be in the graph.
223+
```python
224+
import plotly.graph_objectsas go
225+
226+
fig= go.Figure()
227+
228+
fig.add_trace(go.Scatter(
229+
x=[1,2,3,4,5],
230+
y=[1,2,3,4,5],
231+
mode='markers',
232+
marker={'size':10}
233+
))
234+
235+
fig.add_trace(go.Scatter(
236+
x=[1,2,3,4,5],
237+
y=[5,4,3,2,1],
238+
mode='markers',
239+
marker={'size':100}
240+
))
241+
242+
fig.update_layout(legend= {'itemsizing':'constant'})
243+
244+
fig.show()
245+
```
221246
####Grouped Legend
222247

223248
```python

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp