plotly / plotly/plotly.py

ScatterGL alignment fails above height=8190

Open
#4,315 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Below this height everything works fine. Above this height the alignment of scatterGL marks to tickmarks( or grid lines) completely fails. There is no issue with svg scatter.

height=8180:
CleanShot 2023-08-08 at 14 55 04@2x

height=8500:
CleanShot 2023-08-08 at 14 55 33@2x

Code:

import plotly.graph_objects as go
from dash import dcc
import numpy as np
import dash

app = dash.Dash(__name__)

app.layout = dcc.Graph(id="figure", figure={})

y_values=list(range(1, 353))
scatter_trace = go.Scatter(
    x=np.zeros(353),
    y=y_values,
    showlegend=False,  # Exclude this trace from the legend
    mode="markers"
)
layout = go.Layout(
    height=8500,
)
fig = go.Figure(data=[scatter_trace], layout=layout)

fig.update_yaxes(
    range=[0, len(y_values)],
    tickvals=y_values,
)

app.layout.figure = fig

if __name__ == "__main__":
    app.run_server(debug=True)

Versions:
name : plotly
version : 5.15.0

name : dash
version : 2.11.1

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

Run the supplied Dash reproduction with heights 8180 and 8500, then trace the ScatterGL rendering and axis tick/grid alignment entry points. Compare the WebGL behavior with the SVG scatter case; done means marks remain aligned with tickmarks or grid lines above height=8190 without regressing the working lower-height case.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.