question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Independent axes on facet plots

See original GitHub issue

Is there a way to make the y-axis on faceted plots independent, like in Plotly’s shared_yaxes = False option, or Seaborn’s FacetGrid sharey = False?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

14reactions
nicolaskruchtencommented, Sep 30, 2019

Yes, you can use .update_yaxes(matches=None)… note that this will break the Y-axis linkage for all plots, even within rows, not just across them:

import plotly.express as px
df = px.data.tips()
fig = px.scatter(df, x="total_bill", y="tip", facet_row="day", facet_col="time")
fig.update_yaxes(matches=None)
fig.show()
12reactions
akdor1154commented, Oct 3, 2019

This works, but my second facet lacks a y scale which is now important… any way to add one?

EDIT: to answer my own question:

fig.update_yaxes(showticklabels=True, col=2) # assuming second facet
Read more comments on GitHub >

github_iconTop Results From Across the Web

Facet and trellis plots in Python - Plotly
Facets With Independent Axes¶. By default, facet axes are linked together: zooming inside one of the facets will also zoom in the other...
Read more >
python - How can I make faceted plots in Plotly have their own ...
DataFrame(temp) # Melt the dataframe so I can use plotly express to plot distributions of all variables df_melted = df.melt(id_vars=["Clinic", " ...
Read more >
Set Axis Limits of ggplot2 Facet Plot in R (4 Examples)
Set Axis Limits of ggplot2 Facet Plot in R (4 Examples) | Using facet_wrap & scales. This page shows how to manipulate the...
Read more >
Facets
This keeps the grid layout but preserves the flexibility of scales in wrapped facets. Notice that in the plot below, the x-axes are...
Read more >
VegaLite: Facet plots with independent scales for histograms
I would like to do a facet plot with independent scales for the x-axis, but can't get it to work. It works for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found