Skip to content

Commit 926d584

Browse files
committed
add horizontal colorbar tests
1 parent fb9ca33 commit 926d584

File tree

6 files changed

+139
-0
lines changed

6 files changed

+139
-0
lines changed
24.7 KB
Loading
24.4 KB
Loading
24.5 KB
Loading

test/image/mocks/z_h-colorbar10.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"data": [
3+
{
4+
"x": [-1, 0, 1],
5+
"y": [0, 0, 0],
6+
"mode": "markers",
7+
"marker": {
8+
"size": 100,
9+
"color": [0, 50, 100],
10+
"colorscale": "Reds",
11+
"showscale": true,
12+
"colorbar": {
13+
"orientation": "h",
14+
"yanchor": "bottom",
15+
"y": 0,
16+
"len": 0.5,
17+
"thickness": 10,
18+
"ticks": "outside",
19+
"ticklen": 10,
20+
"bgcolor": "rgba(255,255,0,0.5)",
21+
"borderwidth": 1,
22+
"bordercolor": "gray",
23+
"title": {
24+
"side": "top",
25+
"text": "Colorbar<br>title",
26+
"font": {
27+
"size": 16
28+
}
29+
}
30+
}
31+
}
32+
}
33+
],
34+
"layout": {
35+
"width": 600,
36+
"height": 400,
37+
"plot_bgcolor": "lightblue",
38+
"title": {
39+
"text": "Graph title",
40+
"font": {
41+
"size": 24
42+
}
43+
}
44+
}
45+
}

test/image/mocks/z_h-colorbar11.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"data": [
3+
{
4+
"x": [-1, 0, 1],
5+
"y": [0, 0, 0],
6+
"mode": "markers",
7+
"marker": {
8+
"size": 100,
9+
"color": [0, 50, 100],
10+
"colorscale": "Reds",
11+
"showscale": true,
12+
"colorbar": {
13+
"orientation": "h",
14+
"xanchor": "center",
15+
"yanchor": "middle",
16+
"y": 0.5,
17+
"x": 0.5,
18+
"len": 0.5,
19+
"thickness": 10,
20+
"ticks": "outside",
21+
"ticklen": 10,
22+
"bgcolor": "rgba(255,255,0,0.5)",
23+
"borderwidth": 1,
24+
"bordercolor": "gray",
25+
"title": {
26+
"side": "bottom",
27+
"text": "Colorbar<br>title",
28+
"font": {
29+
"size": 16
30+
}
31+
}
32+
}
33+
}
34+
}
35+
],
36+
"layout": {
37+
"width": 600,
38+
"height": 400,
39+
"plot_bgcolor": "lightblue",
40+
"title": {
41+
"text": "Graph title",
42+
"font": {
43+
"size": 24
44+
}
45+
}
46+
}
47+
}

test/image/mocks/z_h-colorbar12.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"data": [
3+
{
4+
"x": [-1, 0, 1],
5+
"y": [0, 0, 0],
6+
"mode": "markers",
7+
"marker": {
8+
"size": 100,
9+
"color": [0, 50, 100],
10+
"colorscale": "Reds",
11+
"showscale": true,
12+
"colorbar": {
13+
"orientation": "h",
14+
"xanchor": "left",
15+
"yanchor": "top",
16+
"y": 1,
17+
"x": 0,
18+
"len": 0.5,
19+
"thickness": 10,
20+
"ticks": "outside",
21+
"ticklen": 10,
22+
"bgcolor": "rgba(255,255,0,0.5)",
23+
"borderwidth": 1,
24+
"bordercolor": "gray",
25+
"title": {
26+
"side": "right",
27+
"text": "Colorbar<br>title",
28+
"font": {
29+
"size": 16
30+
}
31+
}
32+
}
33+
}
34+
}
35+
],
36+
"layout": {
37+
"width": 600,
38+
"height": 400,
39+
"plot_bgcolor": "lightblue",
40+
"title": {
41+
"text": "Graph title",
42+
"font": {
43+
"size": 24
44+
}
45+
}
46+
}
47+
}

0 commit comments

Comments
 (0)