Skip to content

Commit 9f3368f

Browse files
committed
Update treemaps.md
1 parent f03a9b4 commit 9f3368f

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

doc/python/treemaps.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ jupyter:
55
text_representation:
66
extension: .md
77
format_name: markdown
8-
format_version: '1.2'
9-
jupytext_version: 1.4.2
8+
format_version: '1.3'
9+
jupytext_version: 1.14.1
1010
kernelspec:
11-
display_name: Python 3
11+
display_name: Python 3 (ipykernel)
1212
language: python
1313
name: python3
1414
language_info:
@@ -20,7 +20,7 @@ jupyter:
2020
name: python
2121
nbconvert_exporter: python
2222
pygments_lexer: ipython3
23-
version: 3.7.7
23+
version: 3.8.0
2424
plotly:
2525
description: How to make Treemap Charts with Plotly
2626
display_as: basic
@@ -145,6 +145,23 @@ fig.update_layout(margin = dict(t=50, l=25, r=25, b=25))
145145
fig.show()
146146
```
147147

148+
### Treemap with Rounded Corners
149+
150+
151+
*New in 5.12*
152+
153+
Update treemap sectors to have rounded corners by configuring the `cornerradius` in px.
154+
155+
```python
156+
import plotly.express as px
157+
fig = px.treemap(
158+
names = ["Eve","Cain", "Seth", "Enos", "Noam", "Abel", "Awan", "Enoch", "Azura"],
159+
parents = ["", "Eve", "Eve", "Seth", "Seth", "Eve", "Eve", "Awan", "Eve"]
160+
)
161+
fig.update_traces(marker={"cornerradius": 5})
162+
fig.show()
163+
```
164+
148165
### Basic Treemap with go.Treemap
149166

150167
If Plotly Express does not provide a good starting point, it is also possible to use [the more generic `go.Treemap` class from `plotly.graph_objects`](/python/graph-objects/).

0 commit comments

Comments
 (0)