Skip to content

Commit 7347847

Browse files
committed
581 line coloring tests
1 parent 1ae1932 commit 7347847

8 files changed

+395
-0
lines changed

Diff for: test/image/baselines/gl3d_scatter-color-array.png

67.4 KB
Loading
77.8 KB
Loading
63.6 KB
Loading
89.9 KB
Loading

Diff for: test/image/mocks/gl3d_scatter-color-array.json

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"data": [
3+
{
4+
"x":[-4,-3,-2,-1,0,1,2,3,4,5,6],
5+
"y":[11,10,9,7,5,6,4,2,3,1,3],
6+
"z":[4,5,4,3,2,1,0,-1,-2,-3,-4],
7+
"mode": "lines",
8+
"line": {
9+
"width": 5,
10+
"color": [
11+
"#67001f",
12+
"#b2182b",
13+
"#d6604d",
14+
"#f4a582",
15+
"#fddbc7",
16+
"#d1e5f0",
17+
"#92c5de",
18+
"#4393c3",
19+
"#2166ac",
20+
"#053061"
21+
]
22+
},
23+
"type":"scatter3d"
24+
},
25+
{
26+
"x":[-4,-3,-2,-1,0,1,2,3,4,5,6],
27+
"y":[7,5,6,4,2,3,1,3,-1,-4,-2],
28+
"z":[2,3,4,5,4,3,2,1,0,-1,-2],
29+
"mode": "lines+markers",
30+
"line": {
31+
"width": 5,
32+
"color": [
33+
"#67001f",
34+
"#b2182b",
35+
"#d6604d",
36+
"#f4a582",
37+
"#fddbc7",
38+
"#d1e5f0",
39+
"#92c5de",
40+
"#4393c3",
41+
"#2166ac",
42+
"#053061"
43+
]
44+
},
45+
"type":"scatter3d"
46+
}
47+
],
48+
"layout": {
49+
"title": "Markers should default to line color",
50+
"height":758,
51+
"width":1310
52+
}
53+
}
+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
{
2+
"data": [
3+
{
4+
"x":[-4,-3,-2,-1,0,1,2,3,4,5,6],
5+
"y":[7,5,6,4,2,3,1,3,-1,-4,-2],
6+
"z":[2,3,4,5,4,3,2,1,0,-1,-2],
7+
"marker": {
8+
"color": "purple"
9+
},
10+
"line": {
11+
"width": 10,
12+
"color": [
13+
"rgb(166,206,227)",
14+
"rgb(31,120,180)",
15+
"rgb(31,120,180)",
16+
"rgb(178,223,138)",
17+
"rgb(51,160,44)",
18+
"rgb(51,160,44)",
19+
"rgb(251,154,153)",
20+
"rgb(227,26,28)",
21+
"rgb(255,127,0)",
22+
"rgb(106,61,154)",
23+
"rgb(106,61,154)"
24+
]
25+
},
26+
"type":"scatter3d"
27+
},
28+
{
29+
"x":[-4,-3,-2,-1,0,1,2,3,4,5,6],
30+
"y":[11,10,9,7,5,6,4,2,3,1,3],
31+
"z":[2,3,4,5,4,3,2,1,0,-1,-2],
32+
"marker": {
33+
"color": [1,2,3,4,5,6,7,8,9,10,11]
34+
},
35+
"line": {
36+
"width": 10,
37+
"color": [
38+
"rgb(166,206,227)",
39+
"rgb(31,120,180)",
40+
"rgb(31,120,180)",
41+
"rgb(178,223,138)",
42+
"rgb(51,160,44)",
43+
"rgb(51,160,44)",
44+
"rgb(251,154,153)",
45+
"rgb(227,26,28)",
46+
"rgb(255,127,0)",
47+
"rgb(106,61,154)",
48+
"rgb(106,61,154)"
49+
]
50+
},
51+
"type":"scatter3d"
52+
},
53+
{
54+
"x":[-4,-3,-2,-1,0,1,2,3,4,5,6],
55+
"y":[17,15,14,12,11,10,9,7,5,6,4],
56+
"z":[2,3,4,5,4,3,2,1,0,-1,-2],
57+
"marker": {
58+
"color": [1,2,3,4,5,6,7,8,9,10,11],
59+
"colorscale": "Viridis"
60+
},
61+
"line": {
62+
"width": 10,
63+
"color": [
64+
"rgb(166,206,227)",
65+
"rgb(31,120,180)",
66+
"rgb(31,120,180)",
67+
"rgb(178,223,138)",
68+
"rgb(51,160,44)",
69+
"rgb(51,160,44)",
70+
"rgb(251,154,153)",
71+
"rgb(227,26,28)",
72+
"rgb(255,127,0)",
73+
"rgb(106,61,154)",
74+
"rgb(106,61,154)"
75+
]
76+
},
77+
"type":"scatter3d"
78+
}
79+
80+
],
81+
"layout": {
82+
"title": "Color array for lines, and explicit color for markers",
83+
"height":758,
84+
"width":1310
85+
}
86+
}
+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"data": [
3+
{
4+
"x":[-4,-3,-2,-1,0,1,2,3,4,5,6],
5+
"y":[7,5,6,4,2,3,1,3,-1,-4,-2],
6+
"z":[0,0,0,0,0,0,0,0,0,0,0],
7+
"mode": "lines+markers",
8+
"line": {
9+
"width": 5,
10+
"colorscale": "Viridis",
11+
"color": [1,2,3,4,5,6,7,8,9,10]
12+
},
13+
"marker": {
14+
"size": 5
15+
},
16+
"type":"scatter3d"
17+
},
18+
{
19+
"x":[-4,-3,-2,-1,0,1,2,3,4,5,6],
20+
"y":[10,8,9,7,5,6,4,6,2,-1,1],
21+
"z":[0,0,0,0,0,0,0,0,0,0,0],
22+
"mode": "lines",
23+
"line": {
24+
"width": 8,
25+
"color": "magenta"
26+
},
27+
"marker": {
28+
"size": 10
29+
},
30+
"type":"scatter3d"
31+
},
32+
{
33+
"x":[-4,-3,-2,-1,0,1,2,3,4,5,6],
34+
"y":[12,10,11,9,7,8,6,8,4,1,3],
35+
"z":[0,0,0,0,0,0,0,0,0,0,0],
36+
"mode": "lines+markers",
37+
"line": {
38+
"width": 8,
39+
"color": "magenta"
40+
},
41+
"marker": {
42+
"size": 5
43+
},
44+
"type":"scatter3d"
45+
},
46+
{
47+
"x":[-4,-3,-2,-1,0,1,2,3,4,5,6],
48+
"y":[16,14,15,13,11,12,10,12,8,5,7],
49+
"z":[0,0,0,0,0,0,0,0,0,0,0],
50+
"mode": "lines",
51+
"line": {
52+
"colorscale": "Viridis",
53+
"color": [1,2,3,4,5,6,7,8,9,10],
54+
"width": 5
55+
},
56+
"type":"scatter3d"
57+
},
58+
{
59+
"x":[-4,-3,-2,-1,0,1,2,3,4,5,6],
60+
"y":[20,18,19,17,15,16,14,16,12,9,11],
61+
"z":[0,0,0,0,0,0,0,0,0,0,0],
62+
"mode": "lines",
63+
"line": {
64+
"width": 4
65+
},
66+
"type":"scatter3d"
67+
}
68+
69+
70+
],
71+
"layout": {
72+
"title": "Monochrome and palette based line plots",
73+
"height":758,
74+
"width":1310
75+
}
76+
}

Diff for: test/image/mocks/gl3d_scatter-colorscale-marker.json

+180
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
{
2+
"data": [
3+
{
4+
"x":[-4,-3,-2,-1,0,1,2,3,4,5,6],
5+
"y":[0,0,0,0,0,0,0,0,0,0,0],
6+
"z":[0,0,0,0,0,0,0,0,0,0,0],
7+
"mode": "markers",
8+
"type":"scatter3d",
9+
"marker": {
10+
"size": 14,
11+
"color": [-2,-1,0,1,2,3,4,5,6,7,8],
12+
"colorscale": "Greens",
13+
"cmin": 2,
14+
"cmax": 4,
15+
"cauto": true
16+
}
17+
},
18+
{
19+
"x":[-4,-3,-2,-1,0,1,2,3,4,5,6],
20+
"y":[1,1,1,1,1,1,1,1,1,1,1],
21+
"z":[0,0,0,0,0,0,0,0,0,0,0],
22+
"mode": "markers",
23+
"type":"scatter3d",
24+
"marker": {
25+
"size": 12,
26+
"color": [-2,-1,0,1,2,3,4,5,6,7,8],
27+
"colorscale": "Viridis",
28+
"cmin": 2,
29+
"cmax": 4
30+
}
31+
},
32+
{
33+
"x":[-4,-3,-2,-1,0,1,2,3,4,5,6],
34+
"y":[2,2,2,2,2,2,2,2,2,2,2],
35+
"z":[0,0,0,0,0,0,0,0,0,0,0],
36+
"mode": "markers",
37+
"type":"scatter3d",
38+
"marker": {
39+
"size": 9,
40+
"color": [-2,-1,0,1,2,3,4,5,6,7,8],
41+
"colorscale": "Viridis",
42+
"cmin": -20,
43+
"cmax": 20,
44+
"reversescale": false
45+
}
46+
},
47+
{
48+
"x":[-4,-3,-2,-1,0,1,2,3,4,5,6],
49+
"y":[3,3,3,3,3,3,3,3,3,3,3],
50+
"z":[0,0,0,0,0,0,0,0,0,0,0],
51+
"mode": "markers",
52+
"type":"scatter3d",
53+
"marker": {
54+
"size": 6,
55+
"color": [-2,-1,0,1,2,3,4,5,6,7,8],
56+
"colorscale": "Viridis",
57+
"cmin": -20,
58+
"cmax": 20,
59+
"reversescale": true
60+
}
61+
},
62+
{
63+
"x":[-4,-3,-2,-1,0,1,2,3,4,5,6],
64+
"y":[4,4,4,4,4,4,4,4,4,4,4],
65+
"z":[0,0,0,0,0,0,0,0,0,0,0],
66+
"mode": "markers",
67+
"type":"scatter3d",
68+
"marker": {
69+
"size": 8,
70+
"color": [-2,-1,0,1,2,3,4,5,6,7,8],
71+
"colorscale": "Reds",
72+
"autocolorscale": false
73+
}
74+
},
75+
{
76+
"x":[-4,-3,-2,-1,0,1,2,3,4,5,6],
77+
"y":[5,5,5,5,5,5,5,5,5,5,5],
78+
"z":[0,0,0,0,0,0,0,0,0,0,0],
79+
"mode": "markers",
80+
"type":"scatter3d",
81+
"marker": {
82+
"size": 11,
83+
"color": [-2,-1,0,1,2,3,4,5,6,7,8],
84+
"colorscale": "Viridis",
85+
"autocolorscale": true
86+
}
87+
},
88+
{
89+
"x":[-4,-3,-2,-1,0,1,2,3,4,5,6],
90+
"y":[6,6,6,6,6,6,6,6,6,6,6],
91+
"z":[0,0,0,0,0,0,0,0,0,0,0],
92+
"mode": "markers",
93+
"type":"scatter3d",
94+
"marker": {
95+
"size": 14,
96+
"color": [-2,-1,0,1,2,3,4,5,6,7,8],
97+
"colorscale": "Viridis"
98+
}
99+
},
100+
{
101+
"x":[-4,-3,-2,-1,0,1,2,3,4,5,6],
102+
"y":[7,7,7,7,7,7,7,7,7,7,7],
103+
"z":[0,0,0,0,0,0,0,0,0,0,0],
104+
"mode": "markers",
105+
"type":"scatter3d",
106+
"marker": {
107+
"size": 12,
108+
"color": [-2,-1,0,1,2,3,4,5,6,7,8],
109+
"colorscale": "Viridis",
110+
"cmin": 2,
111+
"cmax": 4,
112+
"reversescale": true
113+
}
114+
},
115+
{
116+
"x":[-4,-3,-2,-1,0,1,2,3,4,5,6],
117+
"y":[8,8,8,8,8,8,8,8,8,8,8],
118+
"z":[0,0,0,0,0,0,0,0,0,0,0],
119+
"mode": "markers",
120+
"type":"scatter3d",
121+
"marker": {
122+
"size": 9,
123+
"color": [-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11]
124+
}
125+
},
126+
{
127+
"x":[-4,-3,-2,-1,0,1,2,3,4,5,6],
128+
"y":[9,9,9,9,9,9,9,9,9,9,9],
129+
"z":[0,0,0,0,0,0,0,0,0,0,0],
130+
"mode": "markers",
131+
"type":"scatter3d",
132+
"marker": {
133+
"size": 7,
134+
"color": [0,1,2,3,4,5,6,7,8,9,10]
135+
}
136+
},
137+
{
138+
"x":[-4,-3,-2,-1,0,1,2,3,4,5,6],
139+
"y":[10,10,10,10,10,10,10,10,10,10,10],
140+
"z":[0,0,0,0,0,0,0,0,0,0,0],
141+
"mode": "markers",
142+
"type":"scatter3d",
143+
"marker": {
144+
"size": 8,
145+
"color": [-2,-1,0,1,2,3,4,5,6,7,8],
146+
"cmin": 2,
147+
"cmax": 4,
148+
"cauto": true
149+
}
150+
},
151+
{
152+
"x":[-4,-3,-2,-1,0,1,2,3,4,5,6],
153+
"y":[11,11,11,11,11,11,11,11,11,11,11],
154+
"z":[0,0,0,0,0,0,0,0,0,0,0],
155+
"mode": "markers",
156+
"type":"scatter3d",
157+
"marker": {
158+
"size": 11,
159+
"color": [-2,-1,0,1,2,3,4,5,6,7,8]
160+
}
161+
},
162+
{
163+
"x":[-4,-3,-2,-1,0,1,2,3,4,5,6],
164+
"y":[12,12,12,12,12,12,12,12,12,12,12],
165+
"z":[0,0,0,0,0,0,0,0,0,0,0],
166+
"mode": "markers",
167+
"type":"scatter3d",
168+
"marker": {
169+
"size": 13,
170+
"color": [-2,-1,0,1,2,3,4,5,6,7,8],
171+
"reversescale": true
172+
}
173+
}
174+
],
175+
"layout": {
176+
"title": "Scatter colorscale marker cauto, constrained and expanded variations",
177+
"height":758,
178+
"width":1310
179+
}
180+
}

0 commit comments

Comments
 (0)