Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

layout image is not rendered when two scatter traces have different zorders #4912

Open
tunaflsh opened this issue Nov 28, 2024 · 0 comments
Open
Labels
bug something broken P3 backlog

Comments

@tunaflsh
Copy link

tunaflsh commented Nov 28, 2024

Steps to reproduce:

import plotly.graph_objects as go
fig = go.Figure()
fig.update_yaxes(scaleanchor='x')
fig.add_traces([{'type': 'scatter', 'mode': 'lines', 'x': [0, 1], 'y': [0, -1], 'zorder': 0},
                {'type': 'scatter', 'mode': 'markers', 'x': [0, 1], 'y': [0, -1], 'zorder': 1}])
fig.add_layout_image(dict(
    source="https://images.plot.ly/language-icons/api-home/python-logo.png",
    xref="x", yref="y", x=0, y=0, sizex=1, sizey=1, layer='below'))
fig.show()

Expected result; This doesn't happen when zorder is equal:

...
fig.add_traces([{'type': 'scatter', 'mode': 'lines', 'x': [0, 1], 'y': [0, -1], 'zorder': 1},
                {'type': 'scatter', 'mode': 'markers', 'x': [0, 1], 'y': [0, -1], 'zorder': 1}])
...
@gvwilson gvwilson added P3 backlog bug something broken labels Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P3 backlog
Projects
None yet
Development

No branches or pull requests

2 participants