Skip to content

Commit bc01dc0

Browse files
committed
add mesh3d mock with different coloring and hover template
1 parent a39a859 commit bc01dc0

File tree

2 files changed

+139
-0
lines changed

2 files changed

+139
-0
lines changed
93.3 KB
Loading
+139
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
{
2+
"data": [{
3+
"showlegend": true,
4+
"x": [0, 1, 0, 1, 0, 1, 0, 1],
5+
"y": [0, 0, 1, 1, 0, 0, 1, 1],
6+
"z": [0, 0, 0, 0, 1, 1, 1, 1],
7+
"i": [0, 3, 4, 7, 0, 6, 1, 7, 0, 5, 2, 7],
8+
"j": [1, 2, 5, 6, 2, 4, 3, 5, 4, 1, 6, 3],
9+
"k": [3, 0, 7, 4, 6, 0, 7, 1, 5, 0, 7, 2],
10+
"vertexcolor": ["#000", "#00F", "#0F0", "#0FF", "#F00", "#F0F", "#FF0", "#FFF"],
11+
"hovertemplate": "x: %{x}<br>y: %{y}<br>z: %{z}<br>vertex color: %{vertexcolor}",
12+
"flatshading": true,
13+
"lightposition": { "x": 1000, "y": 1000, "z": 0 },
14+
"type": "mesh3d",
15+
"name": "vertex color",
16+
"scene": "scene1"
17+
}, {
18+
"showlegend": true,
19+
"x": [0, 1, 0, 1, 0, 1, 0, 1],
20+
"y": [0, 0, 1, 1, 0, 0, 1, 1],
21+
"z": [0, 0, 0, 0, 1, 1, 1, 1],
22+
"i": [0, 3, 4, 7, 0, 6, 1, 7, 0, 5, 2, 7],
23+
"j": [1, 2, 5, 6, 2, 4, 3, 5, 4, 1, 6, 3],
24+
"k": [3, 0, 7, 4, 6, 0, 7, 1, 5, 0, 7, 2],
25+
"facecolor": [
26+
"#000", "#000",
27+
"#00F", "#00F",
28+
"#0F0", "#0F0",
29+
"#0FF", "#0FF",
30+
"#F00", "#F00",
31+
"#F0F", "#F0F",
32+
"#FF0", "#FF0",
33+
"#FFF", "#FFF"
34+
],
35+
"hovertemplate": "x: %{x}<br>y: %{y}<br>z: %{z}<br>face color: %{facecolor}",
36+
"flatshading": true,
37+
"lightposition": { "x": 1000, "y": 1000, "z": 0 },
38+
"type": "mesh3d",
39+
"name": "face color",
40+
"scene": "scene2"
41+
}, {
42+
"showlegend": true,
43+
"x": [0, 1, 0, 1, 0, 1, 0, 1],
44+
"y": [0, 0, 1, 1, 0, 0, 1, 1],
45+
"z": [0, 0, 0, 0, 1, 1, 1, 1],
46+
"i": [0, 3, 4, 7, 0, 6, 1, 7, 0, 5, 2, 7],
47+
"j": [1, 2, 5, 6, 2, 4, 3, 5, 4, 1, 6, 3],
48+
"k": [3, 0, 7, 4, 6, 0, 7, 1, 5, 0, 7, 2],
49+
"intensity": [1, 2, 3, 4, 5, 6, 7, 8],
50+
"hovertemplate": "x: %{x}<br>y: %{y}<br>z: %{z}<br>vertex intensity: %{intensity}",
51+
"showscale": true,
52+
"colorscale": "Portland",
53+
"colorbar": {
54+
"title": "vertex<br>intensity",
55+
"len": 0.5,
56+
"y": 0,
57+
"yanchor": "bottom"
58+
},
59+
"flatshading": true,
60+
"lightposition": { "x": 1000, "y": 1000, "z": 0 },
61+
"type": "mesh3d",
62+
"name": "vertex intensity",
63+
"scene": "scene3"
64+
}, {
65+
"showlegend": true,
66+
"x": [0, 1, 0, 1, 0, 1, 0, 1],
67+
"y": [0, 0, 1, 1, 0, 0, 1, 1],
68+
"z": [0, 0, 0, 0, 1, 1, 1, 1],
69+
"i": [0, 3, 4, 7, 0, 6, 1, 7, 0, 5, 2, 7],
70+
"j": [1, 2, 5, 6, 2, 4, 3, 5, 4, 1, 6, 3],
71+
"k": [3, 0, 7, 4, 6, 0, 7, 1, 5, 0, 7, 2],
72+
"intensity": [
73+
1, 1,
74+
2, 2,
75+
3, 3,
76+
4, 4,
77+
5, 5,
78+
6, 6
79+
],
80+
"intensitymode": "cell",
81+
"hovertemplate": "x: %{x}<br>y: %{y}<br>z: %{z}<br>cell intensity: %{intensity}",
82+
"showscale": true,
83+
"colorbar": {
84+
"title": "cell<br>intensity",
85+
"len": 0.5,
86+
"y": 0.5,
87+
"yanchor": "bottom"
88+
},
89+
"flatshading": true,
90+
"lightposition": { "x": 1000, "y": 1000, "z": 0 },
91+
"type": "mesh3d",
92+
"name": "cell intensity",
93+
"scene": "scene4"
94+
}],
95+
"layout": {
96+
"width": 800,
97+
"height": 800,
98+
"legend": {
99+
"bgcolor": "#eee",
100+
"orientation": "h",
101+
"title": {
102+
"text": "<b>mesh3d with different coloring:</b>",
103+
"side": "top left"
104+
}
105+
},
106+
"scene1": {
107+
"bgcolor": "#eee",
108+
"domain": {
109+
"x": [0, 0.5],
110+
"y": [0, 0.5]
111+
},
112+
"camera": { "eye": { "x": 2, "y": -1.5, "z": 1 } }
113+
},
114+
"scene2": {
115+
"bgcolor": "#eee",
116+
"domain": {
117+
"x": [0, 0.5],
118+
"y": [0.5, 1]
119+
},
120+
"camera": { "eye": { "x": 2, "y": -1.5, "z": 1 } }
121+
},
122+
"scene3": {
123+
"bgcolor": "#eee",
124+
"domain": {
125+
"x": [0.5, 1],
126+
"y": [0, 0.5]
127+
},
128+
"camera": { "eye": { "x": 2, "y": -1.5, "z": 1 } }
129+
},
130+
"scene4": {
131+
"bgcolor": "#eee",
132+
"domain": {
133+
"x": [0.5, 1],
134+
"y": [0.5, 1]
135+
},
136+
"camera": { "eye": { "x": 2, "y": -1.5, "z": 1 } }
137+
}
138+
}
139+
}

0 commit comments

Comments
 (0)