Skip to content

Commit 2e7c4cc

Browse files
author
“mahdis-z”
committed
some minor changes
1 parent 472aaaf commit 2e7c4cc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

python/treemaps.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ fig.add_trace(go.Treemap(
9797
fig.show()
9898
```
9999

100-
### Set Color of Sectors
100+
### Set Color of Treemap Sectors
101101

102102
There are three different ways to change the color of the sectors in Treemap:
103103
1) [marker.colors](https://plot.ly/javascript/reference/#treemap-marker-colors), 2) [colorway](https://plot.ly/javascript/reference/#treemap-colorway), 3) [colorscale](https://plot.ly/javascript/reference/#treemap-colorscale). The following examples show how to use each of them.
@@ -111,7 +111,7 @@ parents = ["", "A1", "A2", "A3", "A4", "", "B1"]
111111
fig = go.Figure(go.Treemap(
112112
labels = labels,
113113
parents = parents,
114-
marker = {'colors': ["pink", "royalblue", "lightgray", "purple", "cyan", "lightgray", "lightblue"]}))
114+
marker_colors = ["pink", "royalblue", "lightgray", "purple", "cyan", "lightgray", "lightblue"]))
115115

116116
fig.show()
117117
```
@@ -145,14 +145,14 @@ fig = go.Figure(go.Treemap(
145145
labels = labels,
146146
values = values,
147147
parents = parents,
148-
marker = {"colorscale": "Blues"}))
148+
marker_colorscale = 'Blues'))
149149

150150
fig.show()
151151
```
152152

153153
### Nested Layers in Treemap
154154

155-
The following example uses hierarchical data that includes layers and grouping. Treemap and [Sunburst](https://plot.ly/python/sunburst-charts/) charts reveal insights into the data, and the format of your hierarchical data.
155+
The following example uses hierarchical data that includes layers and grouping. Treemap and [Sunburst](https://plot.ly/python/sunburst-charts/) charts reveal insights into the data, and the format of your hierarchical data. [maxdepth](https://plot.ly/python/reference/#treemap-maxdepth) attribute sets the number of rendered sectors from the given level.
156156

157157
```python
158158
import plotly.graph_objects as go
@@ -181,7 +181,7 @@ fig.add_trace(
181181
ids = df2.ids,
182182
labels = df2.labels,
183183
parents = df2.parents,
184-
maxdepth = 2),
184+
maxdepth = 3),
185185
col = 2, row = 1)
186186

187187
fig.update_layout(

0 commit comments

Comments
 (0)