layout image is not rendered when two scatter traces have different zorders
Open
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
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}])
...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the supplied Python reproduction and compare it with the equal-zorder example. Trace the scatter zorder and layout-image rendering paths to identify where the image is omitted, then verify that the image renders in both cases without regressing the existing equal-zorder behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100