-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed as not planned
Description
Hey there,
I'm trying to create a plot in python using Plotly that allows me to add 2 x axis to a single plot. I just tried but every single tutorial and documentation add a second trace to the plot with y and x data, but if you do that it will generate a second line and I just want a line that represents both axis. I mean de mainly x axis will be the bottom one and the secondary can be the upper one. The plot will be generated using y and x data (from the mainly x axis).
I already have this, but as you can see is not very clear...
fig = go.Figure()
for percentile, color in zip(percentiles_m, colors_m):
fig.add_trace(
go.Scatter(
y=curves_df[percentile],
x=[curves_df.index, remaining_patients],
name=percentile + "th",
mode="lines+markers",
textposition="top center",
line=dict(color=color),
)
)
fig.update_xaxes(title_text="Remaining patients/Repetition", tickangle=0, tickfont=dict(size=11), dividerwidth=1)
fig.update_yaxes(title_text=feature_selected, tickfont=dict(size=11))
any idea? Thanks!
mhangaard and boyiwei
Metadata
Metadata
Assignees
Labels
No labels