plotly / plotly/plotly.js

Constraint-type contour plot cannot shade entire area

オープン
#6,284 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

bug P3
主要言語
JavaScript
スター
18.3k
フォーク
2k
平均マージ
2日 12時間
マージ済み PR(30日)
28

説明

Steps to reproduce

Create plotly.js data object with the following:

var data = [ {
  z: [[10, 10.625, 12.5, 15.625, 20],
       [5.625, 6.25, 8.125, 11.25, 15.625],
       [2.5, 3.125, 5., 8.125, 12.5],
       [0.625, 1.25, 3.125, 6.25, 10.625],
       [0, 0.625, 2.5, 5.625, 10]],
  type: 'contour',
  colorscale: 'Jet',
    "contours": {
        "coloring": "lines",
        "operation": "][",
        "showlabels": true,
        "type": "constraint",
        "value": [0,20]
    },
}];

Here is a link to a CodePen that shows the problem. https://codepen.io/kfd182/pen/yLKvNLJ

Current behaviour (bug)

Empty plot

Expected behaviour (correct)

Plot that is entirely shaded in

Other comment

When making a contour plot that uses type=‘constraint’ and operation = ‘][’ , setting value = [data-min, data-max] creates an empty plot, instead of a completed shaded plot. If you adjust data-min to be slightly larger or adjust data-max to be slightly smaller, then you get a nearly completely shaded plot.

I think one workaround could be using {operation: '<', and value: data-min}. This will shade the entire plot area.

Reported by

kdaquila-questek

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

調査の方向性

提供された CodePen の再現から始め、値 [data-min, data-max] に対する操作 ][ の輪郭処理を追跡してください。完了条件は、空のプロットではなくデータ範囲全体が網掛けされたプロットとして描画され、近接する境界ケースが引き続き正しく動作することです。

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

評価

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

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

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