I want to plot box plots/scatter plots with facets (depends on dataset, not fixed) and each of the facets should have a different limit line corresponding to the dataset. Is this possible?
I took this code piece from another post and my observations are quite similar.
import plotly.express as px import plotly.graph_objects as go fig = px.box(data, x='group', y='signal', facet_col='id', facet_col_wrap=2, height=1000, title = 'signals', points="all", color="group") fig.update_traces(width=0.6) fig.add_trace(go.Scatter(x=['3','1'], y=[16, 16], mode="lines", name="High Limit")) fig.add_trace(go.Scatter(x=['3','1'], y=[11, 11], mode="lines", name="Low Limit"))
I only see limits on one of the facets (and not even the first one so am not even sure what logic it is using).
Since there will be different limits for each facet, I want to be able to add specific limits to specific facets. My observation so far has indicated that the facet which has the limit line plotted also has limits from some other facets. How do I resolve this ?
Greatly appreciate your time and support.