Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[BUG]: `scatterpolargl` drops points between 10000 and 100000 points

オープン 初心者向け
#8,148 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@Tanishdete333 がすでに取り組んでいます。

2026年10月30日 から。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript

調査の方向性

src/traces/scatterpolargl/calc.jsから始め、convert.styleの後のマーカー設定を、#4323のscatterglの修正と比較してください。提供された90,000点の例で再現し、極座標プロットで点が欠落することを確認してください。このケースでscatterpolarglがscatterglと同じ点密度を表示すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug P3 size: 1
Description

scatterpolargl does not set opts.marker.snap as scattergl does. This limits how many markers are displayed at certain zoom levels due to how regl-scatter2d handles rendering with its default snap value (10000). See #4323.

Screenshots

scatterpolargl vs. scattergl with the same data:

Image
Steps to reproduce
  • Open Plotly devtools and paste the following into the browser devtools console:
const n = 90000;
const gauss = () => (Math.random() + Math.random() + Math.random() + Math.random() - 2) / 2;

const x = [];
const y = [];
const r = [];
const theta = [];
for (let i = 0; i < n; i++) {
    const px = 0.05 * gauss();
    const py = 0.05 * gauss();
    x.push(px);
    y.push(py);
    r.push(Math.hypot(px, py));
    theta.push(Math.atan2(py, px) * 180 / Math.PI);
}

const marker = {color: 'rgba(0,0,255,0.01)', size: 3};

Plotly.newPlot(gd, [
    {type: 'scatterpolargl', mode: 'markers', r, theta, marker, subplot: 'polar'},
    {type: 'scattergl', mode: 'markers', x, y, marker, xaxis: 'x', yaxis: 'y'}
], {
    width: 760,
    height: 420,
    showlegend: false,
    polar: {domain: {x: [0, 0.45]}},
    xaxis: {domain: [0.58, 1], anchor: 'y'},
    yaxis: {domain: [0.1, 0.9], anchor: 'x', scaleanchor: 'x'}
});
  • Note that the scatterpolargl plot is pale compared to scattergl
Notes
  • For a scatterpolargl trace with more than 10000 points, regl-scatter2d builds its own cluster tree. It then draws only the level-of-detail subset of points. The same data on scattergl draws every point.
  • scattergl had this bug but it got fixed in #4323
  • The same fix can be applied to this trace: set opts.marker.snap = len after convert.style in src/traces/scatterpolargl/calc.js
主要言語
JavaScript
スター
18.4k
フォーク
2.1k
平均マージ
1日 9時間
マージ済み PR(30日)
12

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

plotly/plotly.js のほかの issue

plotly/plotly.js の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。