When I create a Plotly Express Faceted Subplots chart, how can I align the subplots so they all have the same ranges for their x and y axes? Currently each subplot has it’s own range (which is even harder to tell because it doesn’t show the x/y values for each individual subplot.
Sample code to replicate problem listed below…
If you hover on the dot in each subplot, the y-axis (“b”) has a different value in each one, but they all show in the same position on each subplot.
import numpy as np
import pandas as pd
import plotly.express as px
df = pd.DataFrame(np.random.randint(25, size = (5, 5)), columns=list(‘abcde’))
print(df)
Chart 4 - Plotly Express Sub-Plot Facets
chart = ‘TS3_4_px’
fig = px.scatter(df, x = ‘a’, y = ‘b’, facet_row = ‘c’, facet_col = ‘d’)
fig.show()