Skip to content

V4.3 docs #192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Nov 12, 2019
Merged
Changes from 3 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
cfac436
new tutorial on displaying image data
emmanuelle Nov 1, 2019
2056d13
minor changes
emmanuelle Nov 5, 2019
6ac3f3d
Document simple_white template
joelostblom Nov 5, 2019
dbbfad2
Change number of themes
joelostblom Nov 5, 2019
10d64b9
minor changes
emmanuelle Nov 6, 2019
4654c06
updated how to disable ticks
emmanuelle Nov 6, 2019
f97dfc4
zmax update
emmanuelle Nov 7, 2019
1aa14f0
Merge pull request #169 from joelostblom/Document-simple_white-template
nicolaskruchten Nov 11, 2019
e41bc91
Merge branch 'master' into v4.3-docs
nicolaskruchten Nov 12, 2019
878d394
Update animations.md
nicolaskruchten Nov 11, 2019
d39828e
added example about facet_col_wrap, and one example for disabling axi…
emmanuelle Nov 4, 2019
2b03f57
unmatched facet warning
nicolaskruchten Nov 12, 2019
7756589
Merge pull request #166 from plotly/facet_col_wrap
nicolaskruchten Nov 12, 2019
4f3bc89
new tutorial on displaying image data
emmanuelle Nov 1, 2019
67c1830
minor changes
emmanuelle Nov 5, 2019
cc59b3c
minor changes
emmanuelle Nov 6, 2019
9d01e29
updated how to disable ticks
emmanuelle Nov 6, 2019
4e93741
zmax update
emmanuelle Nov 7, 2019
7696258
Merge branch 'image' of https://github.com/plotly/plotly.py-docs into…
emmanuelle Nov 12, 2019
bd06f3b
fix color_continuous_scale
emmanuelle Nov 12, 2019
46a3a33
Merge pull request #163 from plotly/image
nicolaskruchten Nov 12, 2019
89e1943
Merge branch 'master' into v4.3-docs
nicolaskruchten Nov 12, 2019
01adb32
fixing kwarg error
nicolaskruchten Nov 12, 2019
43d1ed1
fixing duplicate permalink
nicolaskruchten Nov 12, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion python/facet-plots.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jupyter:
name: python
nbconvert_exporter: python
pygments_lexer: ipython3
version: 3.6.7
version: 3.6.8
plotly:
description: How to make Facet and Trellis Plots in Python with Plotly.
display_as: statistical
Expand Down Expand Up @@ -58,6 +58,18 @@ fig = px.bar(tips, x="size", y="total_bill", color="sex", facet_row="smoker")
fig.show()
```

### Wrapping Column Facets

When the facet dimension has a large number of unique values, it is possible to wrap columns using the `facet_col_wrap` argument.

```python
import plotly.express as px
df = px.data.gapminder()
fig = px.scatter(df, x='gdpPercap', y='lifeExp', color='continent', size='pop',
facet_col='year', facet_col_wrap=4)
fig.show()
```

### Histogram Facet Grids

```python
Expand All @@ -67,3 +79,27 @@ fig = px.histogram(tips, x="total_bill", y="tip", color="sex", facet_row="time",
category_orders={"day": ["Thur", "Fri", "Sat", "Sun"], "time": ["Lunch", "Dinner"]})
fig.show()
```

### Facets with independent axes

By default, facet axes are linked together: zooming inside one of the facets will also zoom in the other facets. You can disable this behaviour when you use `facet_row` only, by disabling `matches` on the Y axes, or when using `facet_col` only, by disabling `matches` on the X axes. It is not recommended to use this approach when using `facet_row` and `facet_col` together, as in this case it becomes very hard to understand the labelling of axes and grid lines.

```python
import plotly.express as px
df = px.data.tips()
fig = px.scatter(df, x="total_bill", y="tip", color='sex', facet_row="day")
fig.update_yaxes(matches=None)
fig.show()
```

```python
import plotly.express as px
df = px.data.tips()
fig = px.scatter(df, x="total_bill", y="tip", color='sex', facet_col="day")
fig.update_xaxes(matches=None)
fig.show()
```

```python

```