-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5166 from plotly/surface-colorscale-with-alpha
Handle colorscale with transparent colors in surface traces
- Loading branch information
Showing
8 changed files
with
171 additions
and
19 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+118 KB
test/image/baselines/gl3d_surface-heatmap-treemap_transparent-colorscale.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
159 changes: 159 additions & 0 deletions
159
test/image/mocks/gl3d_surface-heatmap-treemap_transparent-colorscale.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
{ | ||
"data": [ | ||
{ | ||
"type": "treemap", | ||
"labels": [ | ||
"Alpha", | ||
"Bravo", | ||
"Charlie", | ||
"Delta", | ||
"Echo", | ||
"Foxtrot", | ||
"Golf", | ||
"Hotel", | ||
"India", | ||
"Juliet", | ||
"Kilo", | ||
"Lima", | ||
"Mike", | ||
"November", | ||
"Oscar", | ||
"Papa", | ||
"Quebec", | ||
"Romeo", | ||
"Sierra", | ||
"Tango", | ||
"Uniform", | ||
"Victor", | ||
"Whiskey", | ||
"X ray", | ||
"Yankee", | ||
"Zulu" | ||
], | ||
"parents": [ | ||
"", | ||
"Alpha", | ||
"Alpha", | ||
"Charlie", | ||
"Charlie", | ||
"Charlie", | ||
"Foxtrot", | ||
"Foxtrot", | ||
"Foxtrot", | ||
"Foxtrot", | ||
"Juliet", | ||
"Juliet", | ||
"Juliet", | ||
"Juliet", | ||
"Juliet", | ||
"Oscar", | ||
"Oscar", | ||
"Oscar", | ||
"Oscar", | ||
"Oscar", | ||
"Oscar", | ||
"Uniform", | ||
"Uniform", | ||
"Uniform", | ||
"Uniform", | ||
"Uniform", | ||
"Uniform" | ||
], | ||
"level": "Juliet", | ||
"count": "leaves+branches", | ||
"textinfo": "label", | ||
"insidetextorientation": "horizontal", | ||
"marker": { | ||
"line": { | ||
"color": "#777" | ||
}, | ||
"colorscale": [ | ||
[0, "rgba(0,0,255,1)"], | ||
[0.5, "rgba(0,255,0,0.0)"], | ||
[1, "rgba(255,0,0,1)"] | ||
], | ||
"showscale": false | ||
}, | ||
"domain": { | ||
"x": [0, 0.3] | ||
} | ||
}, | ||
{ | ||
"type": "heatmap", | ||
"zsmooth": "best", | ||
"coloraxis": "coloraxis", | ||
"contours": { | ||
"z": { | ||
"show": true | ||
} | ||
}, | ||
"x": [0, 0.25, 0.5, 0.75, 1], | ||
"y": [0, 0.25, 0.5, 0.75, 1], | ||
"z": [ | ||
[0, 0, 0, 0, 0], | ||
[0, 0.1, 0.8, 0.7, 0], | ||
[0, 0.2, 0, 0.6, 0], | ||
[0, 0.3, 0.4, 0.5, 0], | ||
[0, 0, 0, 0, 0] | ||
] | ||
}, | ||
{ | ||
"type": "surface", | ||
"coloraxis": "coloraxis", | ||
"contours": { | ||
"z": { | ||
"show": true | ||
} | ||
}, | ||
"x": [0, 0.25, 0.5, 0.75, 1], | ||
"y": [0, 0.25, 0.5, 0.75, 1], | ||
"z": [ | ||
[0, 0, 0, 0, 0], | ||
[0, 0.1, 0.8, 0.7, 0], | ||
[0, 0.2, 0, 0.6, 0], | ||
[0, 0.3, 0.4, 0.5, 0], | ||
[0, 0, 0, 0, 0] | ||
] | ||
} | ||
], | ||
"layout": { | ||
"width": 1000, | ||
"height": 350, | ||
"title": { | ||
"text": "treemap, heatmap & surface plots with transparent colorscale" | ||
}, | ||
"coloraxis": { | ||
"colorscale": [ | ||
[0, "rgba(0,0,255,1)"], | ||
[0.5, "rgba(0,255,0,0.0)"], | ||
[1, "rgba(255,0,0,1)"] | ||
] | ||
}, | ||
"margin": { | ||
"t": 75, | ||
"l": 25, | ||
"r": 25, | ||
"b": 25 | ||
}, | ||
"xaxis": { | ||
"domain": [0.35, 0.65] | ||
}, | ||
"scene": { | ||
"domain": { | ||
"x": [0.7, 1] | ||
}, | ||
"camera": { | ||
"eye": { | ||
"x": 0, | ||
"y": 0, | ||
"z": 2 | ||
}, | ||
"up": { | ||
"x": 0, | ||
"y": 1, | ||
"z": 0 | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters