plotly / plotly/plotly.py

Update_yaxes mirror not working

Open
#4,940 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P3
Dominant language
Python
Stars
18.8k
Forks
2.8k
Avg merge
16h 26m
Merged PRs (30d)
21

Description

When I set the mirror value to True in the update_yaxes function, I expected the right line of the graph to be drawn, but it is not drawn.

fig_combine = go.Figure()
color_index = 0
fig_combine.add_trace(go.Bar
                            (x=[1,2,3,4,5,6,7,8], y=[1,2,3,4,5,6,7,8,9], name=f"test", marker=dict(color=colors[color_index]), opacity=0.7))

fig_combine.update_layout(
                        width=650,
                        height=700,
                        title=dict(text=f"{fraction} Fraction", font=dict(size=20, color="black"), x=0.5, y=0.9, xanchor="center", yanchor="top"),
                        barmode="overlay"
                        )
fig_combine.update_layout(legend=dict(orientation="v", xanchor="center", yanchor="top", x=0.13, y=0.99, bgcolor='rgba(255, 255, 255, 0.5)'))
fig_combine.update_xaxes(
                        title="Equivalent Circle Diameter(ECD, µm)",
                        showgrid=True,
                        range=[0, 9],
                        dtick=0.5,
                        showline = True,
                        mirror = True
                        )
fig_combine.update_yaxes(
                        title=f"{fraction} Fraction(%)",
                        showgrid=True,
                        range=[0, 9],
                        dtick=2,
                        showline = True,
                        **mirror = True**
                        )

Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the reproducing figure code and compare the x-axis and y-axis behavior when showline and mirror are enabled through update_xaxes and update_yaxes. Confirm the fix by verifying that the y-axis right line is rendered while the existing axis settings and graph appearance remain correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.