Skip to content

Commit 96ae271

Browse files
committed
formatting
1 parent a97b2b4 commit 96ae271

File tree

4 files changed

+24
-19
lines changed

4 files changed

+24
-19
lines changed

doc/python/funnel-charts.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,14 @@ from plotly import graph_objects as go
211211

212212
colors = ["gold", "gold", "lightgreen", "lavender"]
213213

214-
fig = go.Figure(go.Funnelarea(
215-
labels = ["Interview 1","Interview 2", "Test", "Final Stage"],
216-
values = [100, 70, 40, 20],
217-
textfont_size=20,
218-
marker={"colors":colors, "pattern": {"shape": ["", "/", "", ""]}},
219-
))
214+
fig = go.Figure(
215+
go.Funnelarea(
216+
labels=["Interview 1", "Interview 2", "Test", "Final Stage"],
217+
values=[100, 70, 40, 20],
218+
textfont_size=20,
219+
marker=dict(colors=colors, pattern=dict(shape=["", "/", "", ""])),
220+
)
221+
)
220222
fig.show()
221223
```
222224

doc/python/pie-charts.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -312,18 +312,19 @@ import plotly.graph_objects as go
312312
labels = ["Oxygen", "Hydrogen", "Carbon_Dioxide", "Nitrogen"]
313313
values = [4500, 2500, 1053, 500]
314314
colors = ["gold", "mediumturquoise", "darkorange", "lightgreen"]
315+
315316
fig = go.Figure(
316317
data=[
317318
go.Pie(
318319
labels=labels,
319320
values=values,
320321
textfont_size=20,
321-
marker={"colors": colors, "pattern": {"shape": [".", "x", "+", "-"]}},
322+
marker=dict(colors=colors, pattern=dict(shape=[".", "x", "+", "-"]))
322323
)
323324
]
324325
)
325-
fig.show()
326326

327+
fig.show()
327328
```
328329

329330
### See Also: Sunburst charts

doc/python/sunburst-charts.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,11 @@ fig = go.Figure(
316316
values=[65, 14, 12, 10, 2, 6, 6, 4, 4],
317317
branchvalues="total",
318318
textfont_size=16,
319-
marker={
320-
"pattern": {"shape": ["", "/", "/", ".", ".", "/", "/", ".", "/"], "solidity": 0.9}
321-
},
319+
marker=dict(
320+
pattern=dict(
321+
shape=["", "/", "/", ".", ".", "/", "/", ".", "/"], solidity=0.9
322+
)
323+
),
322324
)
323325
)
324326

doc/python/treemaps.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -432,15 +432,15 @@ Treemap charts support [patterns](/python/pattern-hatching-texture/) (also known
432432
```python
433433
import plotly.graph_objects as go
434434

435-
fig = go.Figure(go.Treemap(
436-
labels = ["Eve","Cain", "Seth", "Enos", "Noam", "Abel", "Awan", "Enoch", "Azura"],
437-
parents = ["", "Eve", "Eve", "Seth", "Seth", "Eve", "Eve", "Awan", "Eve"],
438-
root_color="lightgrey",
439-
textfont_size=20,
440-
marker=dict(
441-
pattern=dict(shape=["|"], solidity=0.80)
435+
fig = go.Figure(
436+
go.Treemap(
437+
labels = ["Eve","Cain", "Seth", "Enos", "Noam", "Abel", "Awan", "Enoch", "Azura"],
438+
parents=["", "Eve", "Eve", "Seth", "Seth", "Eve", "Eve", "Awan", "Eve"],
439+
root_color="lightgrey",
440+
textfont_size=20,
441+
marker=dict(pattern=dict(shape=["|"], solidity=0.80)),
442442
)
443-
))
443+
)
444444

445445
fig.show()
446446
```

0 commit comments

Comments
 (0)