Constraint-type contour plot cannot shade entire area
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 18.3k
- Forks
- 2k
- Ø Merge
- 2 T. 12 Std.
- Gemergte PRs (30 T.)
- 28
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginnen Sie mit der bereitgestellten CodePen-Reproduktion und verfolgen Sie die Konturbehandlung für die Operation ][ mit dem Wert [data-min, data-max]. Als abgeschlossen gilt die Aufgabe, wenn der gesamte Datenbereich als schattierter Plot statt als leerer Plot gerendert wird und sich die benachbarten Grenzfälle weiterhin korrekt verhalten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 45/100