Skip to content

Commit e2f870c

Browse files
author
mahdis-z
committedJul 24, 2019
modifications
1 parent 5896c21 commit e2f870c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎python/parallel-categories-diagram.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ import plotly.express as px
6565
tips = px.data.tips()
6666
fig = px.parallel_categories(tips, dimensions=['sex', 'smoker', 'day'],
6767
color="size", color_continuous_scale=px.colors.sequential.Inferno,
68-
labels={'sex':'SEX', 'smoker':'SMOKER', 'day':'DAY'})
68+
labels={'sex':'Payer sex', 'smoker':'Smokers at the table', 'day':'Day of week'})
6969
fig.show()
7070
```
7171

@@ -94,7 +94,7 @@ If the frequency of occurrence for each combination of attributes is known in ad
9494
```python
9595
import plotly.graph_objects as go
9696

97-
parcats = go.Parcats(
97+
fig = go.Figure(go.Parcats(
9898
dimensions=[
9999
{'label': 'Hair',
100100
'values': ['Black', 'Brown', 'Brown', 'Brown', 'Red']},
@@ -103,9 +103,9 @@ parcats = go.Parcats(
103103
{'label': 'Sex',
104104
'values': ['Female', 'Male', 'Female', 'Male', 'Male']}],
105105
counts=[6, 10, 40, 23, 7]
106-
)
106+
))
107+
107108

108-
fig = go.Figure(parcats)
109109
fig.show()
110110
```
111111

0 commit comments

Comments
 (0)
Please sign in to comment.