Skip to content

Commit 5d9c677

Browse files
KangboLuemmanuelle
authored andcommitted
Update description for sunburst basic example (#135)
1 parent d71fd6b commit 5d9c677

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

python/sunburst-charts.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jupyter:
2020
name: python
2121
nbconvert_exporter: python
2222
pygments_lexer: ipython3
23-
version: 3.6.8
23+
version: 3.7.3
2424
plotly:
2525
description: How to make Sunburst Charts.
2626
display_as: basic
@@ -37,6 +37,13 @@ jupyter:
3737
---
3838

3939
### Basic Sunburst Plot ###
40+
Sunburst plot visualizes hierarchical data spanning outwards radially from root to leaves. The sunburst sectors are determined by the entries in "labels" and in "parents". The root starts from the center and children are added to the outer rings.
41+
42+
Main arguments:
43+
1. **labels**: sets the labels of sunburst sectors.
44+
2. **parents**: sets the parent sectors of sunburst sectors. An empty string '' is used for the root node in the hierarchy. In this example, the root is "Eve".
45+
3. **values**: sets the values associated with sunburst sectors, determining their width (See the "Branchvalues" section below for different modes for setting the width).
46+
4047

4148
```python
4249
import plotly.graph_objects as go
@@ -46,6 +53,8 @@ fig =go.Figure(go.Sunburst(
4653
parents=["", "Eve", "Eve", "Seth", "Seth", "Eve", "Eve", "Awan", "Eve" ],
4754
values=[10, 14, 12, 10, 2, 6, 6, 4, 4],
4855
))
56+
# Update layout for tight margin
57+
# See https://plot.ly/python/creating-and-updating-figures/
4958
fig.update_layout(margin = dict(t=0, l=0, r=0, b=0))
5059

5160
fig.show()

0 commit comments

Comments
 (0)