Skip to content

Commit 49103b4

Browse files
committed
add shared color axes mocks
1 parent bd81ac2 commit 49103b4

File tree

4 files changed

+263
-0
lines changed

4 files changed

+263
-0
lines changed
43.1 KB
Loading
Loading
+125
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
{
2+
"data": [{
3+
"name": "heatmap 1 - coloraxis 1",
4+
"type": "heatmap",
5+
"x": [1, 2],
6+
"z": [[1, 2], [4, -3]],
7+
"coloraxis": "coloraxis"
8+
}, {
9+
"name": "heatmap 2 - coloraxis 1",
10+
"type": "heatmap",
11+
"x": [3, 4],
12+
"z": [[10, 2], [4, 3]],
13+
"coloraxis": "coloraxis"
14+
}, {
15+
"name": "heatmap 3 - coloraxis 1",
16+
"type": "heatmap",
17+
"x": [5, 6],
18+
"z": [[3, -2], [4, 5]],
19+
"coloraxis": "coloraxis"
20+
},
21+
22+
{
23+
"name": "bar marker.color scale - coloraxis 2",
24+
"type": "bar",
25+
"y": [1, 2, 1],
26+
"marker": {
27+
"color": [20, 2, 30],
28+
"coloraxis": "coloraxis2"
29+
},
30+
"xaxis": "x2",
31+
"yaxis": "y2"
32+
}, {
33+
"name": "marker.line.color scale - coloraxis 2",
34+
"mode": "markers",
35+
"y": [1.5, 2.5, 1.5],
36+
"marker": {
37+
"color": "#444",
38+
"size": 10,
39+
"line": {
40+
"width": 2,
41+
"color": [12, 2, 10],
42+
"coloraxis": "coloraxis2"
43+
}
44+
},
45+
"xaxis": "x2",
46+
"yaxis": "y2"
47+
},
48+
49+
{
50+
"name": "histogram2d 1 - coloraxis 3",
51+
"type": "histogram2d",
52+
"x": [1, 2, 3, 3, 3, 4, 5],
53+
"y": [1, 2, 5, 5, 5, 2, 1],
54+
"coloraxis": "coloraxis3",
55+
"xaxis": "x3",
56+
"yaxis": "y3"
57+
}, {
58+
"name": "histogram2d 1 - coloraxis 3",
59+
"type": "histogram2d",
60+
"x": [1, 2, 5, 5, 5, 2, 1],
61+
"y": [1, 2, 3, 3, 3, 4, 5],
62+
"coloraxis": "coloraxis3",
63+
"xaxis": "x3",
64+
"yaxis": "y3"
65+
},
66+
67+
{
68+
"name": "scatterpolar marker.color - coloraxis 3 <b>N.B.</b> across subplots!",
69+
"type": "scatterpolar",
70+
"mode": "markers",
71+
"r": [1, 2, 3],
72+
"marker": {
73+
"symbol": "diamond",
74+
"size": 10,
75+
"color": [2, 3, 4],
76+
"coloraxis": "coloraxis3"
77+
}
78+
}],
79+
"layout": {
80+
"showlegend": false,
81+
"grid": {"rows": 2, "columns": 2, "pattern": "independent"},
82+
"polar": {"domain": {"row": 1, "column": 1}},
83+
84+
"coloraxis": {
85+
"colorbar": {
86+
"len": 0.5,
87+
"x": -0.05, "xanchor": "right",
88+
"y": 1, "yanchor": "top"
89+
}
90+
},
91+
"coloraxis2": {
92+
"colorbar": {
93+
"len": 0.5,
94+
"x": 1.05, "xanchor": "left",
95+
"y": 1, "yanchor": "top"
96+
}
97+
},
98+
"coloraxis3": {
99+
"cauto": false,
100+
"cmax": 5,
101+
"colorscale": "Viridis",
102+
"colorbar": {
103+
"len": 0.5,
104+
"x": -0.05, "xanchor": "right",
105+
"y": 0, "yanchor": "bottom",
106+
"dtick": 1
107+
}
108+
},
109+
110+
"colorscale": {
111+
"sequential": "Greens"
112+
},
113+
114+
"template": {
115+
"layout": {
116+
"coloraxis": {
117+
"colorbar": {"outlinewidth": 2}
118+
},
119+
"coloraxis3": {
120+
"colorbar": {"outlinecolor": "blue", "outlinewidth": 4}
121+
}
122+
}
123+
}
124+
}
125+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
{
2+
"data": [{
3+
"name": "contour coloring:heatmap 1 - coloraxis 1",
4+
"type": "contour",
5+
"x": [1, 2],
6+
"z": [[1, 2], [10, -3]],
7+
"contours": {"coloring": "heatmap"},
8+
"coloraxis": "coloraxis"
9+
}, {
10+
"name": "heatmap - coloraxis 1",
11+
"type": "heatmap",
12+
"x": [3, 4],
13+
"z": [[4, 2], [4, 3]],
14+
"coloraxis": "coloraxis"
15+
}, {
16+
"name": "markers - coloraxis 1",
17+
"mode": "markers",
18+
"x": [1, 3, 5],
19+
"y": [1, 2, 1],
20+
"marker": {
21+
"size": 20,
22+
"symbol": "diamond",
23+
"color": [1, 2, 0],
24+
"coloraxis": "coloraxis"
25+
}
26+
}, {
27+
"name": "contour coloring:heatmap 2 - coloraxis 1",
28+
"type": "contour",
29+
"x": [5, 6],
30+
"z": [[3, -6], [4, 5]],
31+
"contours": {"coloring": "heatmap"},
32+
"coloraxis": "coloraxis"
33+
},
34+
35+
{
36+
"name": "contour 1 - coloraxis 2",
37+
"type": "contour",
38+
"x": [1, 2],
39+
"z": [[3, -6], [4, 5]],
40+
"coloraxis": "coloraxis2",
41+
"xaxis": "x2",
42+
"yaxis": "y2"
43+
}, {
44+
45+
"name": "contour 2 - coloraxis 2",
46+
"type": "contour",
47+
"x": [2, 3],
48+
"z": [[1, 2], [10, -3]],
49+
"coloraxis": "coloraxis2",
50+
"xaxis": "x2",
51+
"yaxis": "y2"
52+
},
53+
54+
{
55+
"name": "contour coloring:lines - coloraxis 3",
56+
"type": "contour",
57+
"x": [1, 2],
58+
"z": [[3, -6], [4, 5]],
59+
"contours": {"coloring": "lines"},
60+
"line": {"width": 2},
61+
"coloraxis": "coloraxis3",
62+
"xaxis": "x3",
63+
"yaxis": "y3"
64+
}, {
65+
66+
"name": "contour coloring:lines 2 - coloraxis 3",
67+
"type": "contour",
68+
"x": [2, 3],
69+
"z": [[1, 2], [10, -3]],
70+
"contours": {"coloring": "lines"},
71+
"line": {"width": 2},
72+
"coloraxis": "coloraxis3",
73+
"xaxis": "x3",
74+
"yaxis": "y3"
75+
},
76+
77+
{
78+
"name": "contour coloring:heatmap edge case - coloraxis 4",
79+
"type": "contour",
80+
"x": [1, 2, 3],
81+
"z": [[1, 2, 3], [1, 2, 3]],
82+
"contours": {
83+
"coloring": "heatmap",
84+
"start": 1, "end": 5
85+
},
86+
"coloraxis": "coloraxis4",
87+
"xaxis": "x4",
88+
"yaxis": "y4"
89+
}, {
90+
"name": "contour coloring:heatmap edge case 2 - coloraxis 4",
91+
"type": "contour",
92+
"x": [5, 6, 7],
93+
"z": [[2, 3, 4], [2, 3, 4]],
94+
"contours": {
95+
"coloring": "heatmap",
96+
"start": 0, "end": 3
97+
},
98+
"coloraxis": "coloraxis4",
99+
"xaxis": "x4",
100+
"yaxis": "y4"
101+
}],
102+
103+
"layout": {
104+
"showlegend": false,
105+
"grid": {"rows": 2, "columns": 2, "pattern": "independent"},
106+
107+
"coloraxis": {
108+
"colorbar": {
109+
"len": 0.5,
110+
"x": -0.05, "xanchor": "right",
111+
"y": 1, "yanchor": "top"
112+
}
113+
},
114+
"coloraxis2": {
115+
"colorbar": {
116+
"dtick": 1,
117+
"len": 0.5,
118+
"x": 1.05, "xanchor": "left",
119+
"y": 1, "yanchor": "top"
120+
}
121+
},
122+
"coloraxis3": {
123+
"colorbar": {
124+
"len": 0.5,
125+
"x": -0.05, "xanchor": "right",
126+
"y": 0, "yanchor": "bottom"
127+
}
128+
},
129+
"coloraxis4": {
130+
"colorscale": "Viridis",
131+
"colorbar": {
132+
"len": 0.5,
133+
"x": 1.05, "xanchor": "left",
134+
"y": 0, "yanchor": "bottom"
135+
}
136+
}
137+
}
138+
}

0 commit comments

Comments
 (0)