Skip to content

Commit bb52dbc

Browse files
document px.NO_COLOR
1 parent ffc29e6 commit bb52dbc

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Diff for: doc/python/wide-form.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,16 @@ fig = px.bar(wide_df, x="nation", y=["gold", "silver", "bronze"], facet_col="var
158158
fig.show()
159159
```
160160

161+
You can also prevent `color` from getting assigned if you're mapping `variable` to some other argument:
162+
163+
```python
164+
import plotly.express as px
165+
wide_df = px.data.medals_wide(indexed=False)
166+
167+
fig = px.bar(wide_df, x="nation", y=["gold", "silver", "bronze"], facet_col="variable", color=px.NO_COLOR)
168+
fig.show()
169+
```
170+
161171
If using a data frame's named indexes, either explicitly or relying on the defaults, the row-index references (i.e. `df.index`) or column-index names (i.e. the value of `df.columns.name`) must be used:
162172

163173
```python
@@ -302,4 +312,4 @@ fig.show()
302312

303313
fig = px.box(wide_df, orientation="h")
304314
fig.show()
305-
```
315+
```

0 commit comments

Comments
 (0)