Skip to content

Commit fb9ca33

Browse files
committed
add horizontal colorbar test
1 parent 9119a04 commit fb9ca33

File tree

2 files changed

+241
-0
lines changed

2 files changed

+241
-0
lines changed
49.2 KB
Loading
Lines changed: 241 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,241 @@
1+
{
2+
"data": [
3+
{
4+
"zmax": 10,
5+
"colorscale": [
6+
[
7+
0,
8+
"#ffffcc"
9+
],
10+
[
11+
1,
12+
"#ffffcc"
13+
]
14+
],
15+
"text": [
16+
"1.0CO",
17+
"2.0OR",
18+
"3.0ID",
19+
"3.0KY",
20+
"3.0MT",
21+
"3.0PA",
22+
"5.0MD",
23+
"6.0TN"
24+
],
25+
"zmin": 0,
26+
"locations": [
27+
"CO",
28+
"OR",
29+
"ID",
30+
"KY",
31+
"MT",
32+
"PA",
33+
"MD",
34+
"TN"
35+
],
36+
"colorbar": {
37+
"orientation": "h", "xanchor": "left",
38+
"tick0": 0,
39+
"y": 0.2,
40+
"dtick": 10,
41+
"len": 0.15, "thickness": 10,
42+
"x": 1
43+
},
44+
"locationmode": "USA-states",
45+
"z": [
46+
1,
47+
2,
48+
3,
49+
3,
50+
3,
51+
3,
52+
5,
53+
6
54+
],
55+
"type": "choropleth"
56+
},
57+
{
58+
"zmax": 100,
59+
"colorscale": [
60+
[
61+
0,
62+
"#addd8e"
63+
],
64+
[
65+
1,
66+
"#addd8e"
67+
]
68+
],
69+
"text": [
70+
"11.0IL",
71+
"12.0CA",
72+
"15.0DE",
73+
"17.0SD",
74+
"19.0IN",
75+
"20.0MS",
76+
"23.0NH",
77+
"24.0WY",
78+
"26.0AR",
79+
"27.0LA",
80+
"27.0NM",
81+
"36.0AZ",
82+
"36.0NE",
83+
"42.0NC",
84+
"42.0SC",
85+
"52.0OH",
86+
"52.0UT",
87+
"55.0AL",
88+
"56.0GA",
89+
"61.0WA",
90+
"71.0NV",
91+
"84.0MO",
92+
"89.0FL"
93+
],
94+
"zmin": 10,
95+
"locations": [
96+
"IL",
97+
"CA",
98+
"DE",
99+
"SD",
100+
"IN",
101+
"MS",
102+
"NH",
103+
"WY",
104+
"AR",
105+
"LA",
106+
"NM",
107+
"AZ",
108+
"NE",
109+
"NC",
110+
"SC",
111+
"OH",
112+
"UT",
113+
"AL",
114+
"GA",
115+
"WA",
116+
"NV",
117+
"MO",
118+
"FL"
119+
],
120+
"colorbar": {
121+
"orientation": "h", "xanchor": "left",
122+
"tick0": 10,
123+
"y": 0.4,
124+
"dtick": 90,
125+
"len": 0.15, "thickness": 10,
126+
"x": 1
127+
},
128+
"locationmode": "USA-states",
129+
"z": [
130+
11,
131+
12,
132+
15,
133+
17,
134+
19,
135+
20,
136+
23,
137+
24,
138+
26,
139+
27,
140+
27,
141+
36,
142+
36,
143+
42,
144+
42,
145+
52,
146+
52,
147+
55,
148+
56,
149+
61,
150+
71,
151+
84,
152+
89
153+
],
154+
"type": "choropleth"
155+
},
156+
{
157+
"zmax": 1000,
158+
"colorscale": [
159+
[
160+
0,
161+
"#78c679"
162+
],
163+
[
164+
1,
165+
"#78c679"
166+
]
167+
],
168+
"text": [
169+
"109.0VA",
170+
"112.0OK",
171+
"129.0CT"
172+
],
173+
"zmin": 100,
174+
"locations": [
175+
"VA",
176+
"OK",
177+
"CT"
178+
],
179+
"colorbar": {
180+
"orientation": "h", "xanchor": "left",
181+
"tick0": 100,
182+
"y": 0.6,
183+
"dtick": 900,
184+
"len": 0.15, "thickness": 10,
185+
"x": 1
186+
},
187+
"locationmode": "USA-states",
188+
"z": [
189+
109,
190+
112,
191+
129
192+
],
193+
"type": "choropleth"
194+
},
195+
{
196+
"zmax": 1500,
197+
"colorscale": [
198+
[
199+
0,
200+
"#31a354"
201+
],
202+
[
203+
1,
204+
"#31a354"
205+
]
206+
],
207+
"text": [
208+
"1281.0TX"
209+
],
210+
"zmin": 1000,
211+
"locations": [
212+
"TX"
213+
],
214+
"colorbar": {
215+
"orientation": "h", "xanchor": "left",
216+
"tick0": 1000,
217+
"y": 0.8,
218+
"dtick": 500,
219+
"len": 0.15, "thickness": 10,
220+
"x": 1
221+
},
222+
"locationmode": "USA-states",
223+
"z": [
224+
1281
225+
],
226+
"type": "choropleth"
227+
}
228+
],
229+
"layout": {
230+
"paper_bgcolor": "lightgray",
231+
"width": 600,
232+
"height": 400,
233+
"title": {"text": "Executions by U.S. State Since 1819"},
234+
"geo": {
235+
"scope": "usa",
236+
"projection": {
237+
"type": "albers usa"
238+
}
239+
}
240+
}
241+
}

0 commit comments

Comments
 (0)