Skip to content

Commit 879b006

Browse files
authored
Merge pull request #4642 from plotly/surface-with-contour-and-opacity
Fix to display transparent surface with contours when opacity is less than one
2 parents dff40cc + 09e2da0 commit 879b006

File tree

4 files changed

+79
-4
lines changed

4 files changed

+79
-4
lines changed

package-lock.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"gl-select-box": "^1.0.3",
8989
"gl-spikes2d": "^1.0.2",
9090
"gl-streamtube3d": "^1.4.0",
91-
"gl-surface3d": "^1.5.0",
91+
"gl-surface3d": "^1.5.1",
9292
"gl-text": "^1.1.8",
9393
"glslify": "^7.0.0",
9494
"has-hover": "^1.0.1",
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
{
2+
"data": [
3+
{
4+
"opacity": 0.5,
5+
"type": "surface",
6+
"colorscale": "Earth",
7+
"contours": {
8+
"z": {
9+
"show": true
10+
}
11+
},
12+
"x": [
13+
0,
14+
0.25,
15+
0.5,
16+
0.75,
17+
1
18+
],
19+
"y": [
20+
0,
21+
0.25,
22+
0.5,
23+
0.75,
24+
1
25+
],
26+
"z": [
27+
[
28+
0,
29+
0,
30+
0,
31+
0,
32+
0
33+
],
34+
[
35+
0,
36+
0.1,
37+
0.8,
38+
0.7,
39+
0
40+
],
41+
[
42+
0,
43+
0.2,
44+
0,
45+
0.6,
46+
0
47+
],
48+
[
49+
0,
50+
0.3,
51+
0.4,
52+
0.5,
53+
0
54+
],
55+
[
56+
0,
57+
0,
58+
0,
59+
0,
60+
0
61+
]
62+
]
63+
}
64+
],
65+
"layout": {
66+
"width": 600,
67+
"height": 400,
68+
"margin": {
69+
"t": 10,
70+
"b": 10,
71+
"l": 10,
72+
"r": 10
73+
}
74+
}
75+
}

0 commit comments

Comments
 (0)