Skip to content

Commit 14c832e

Browse files
committed
image tests of contour labels
1 parent e1880c1 commit 14c832e

File tree

6 files changed

+31
-9
lines changed

6 files changed

+31
-9
lines changed
2.98 KB
Loading
3.15 KB
Loading
5.03 KB
Loading

test/image/mocks/contour_edge_cases.json

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@
88
"contours": {
99
"start": 1.1,
1010
"end": 4.09,
11-
"size": 1
11+
"size": 1,
12+
"showlabels": true,
13+
"labelformat": ".3f",
14+
"labelfont": {
15+
"size": "8",
16+
"color": "#0f0"
17+
}
1218
},
1319
"colorbar": {"x": 0.4, "y": 0.9, "len": 0.2}
1420
},
@@ -35,7 +41,9 @@
3541
"contours": {
3642
"start": -0.000001,
3743
"end": 0.000001,
38-
"size": 0.000001
44+
"size": 0.000001,
45+
"showlabels": true,
46+
"labelformat": ".1e"
3947
},
4048
"colorbar": {"x": 0.4, "y": 0.65, "len": 0.2},
4149
"yaxis": "y2"
@@ -50,7 +58,11 @@
5058
"contours": {
5159
"start": -0.000001,
5260
"end": 0.000001,
53-
"size": 0.000001
61+
"size": 0.000001,
62+
"showlabels": true
63+
},
64+
"line": {
65+
"color": "#fff"
5466
},
5567
"colorbar": {"x": 1, "y": 0.65, "len": 0.2},
5668
"xaxis": "x2",
@@ -66,9 +78,10 @@
6678
"contours": {
6779
"start": -0.000001,
6880
"end": 0.000001,
69-
"size": 0.000001
81+
"size": 0.000001,
82+
"showlabels": true
7083
},
71-
"colorbar": {"x": 0.4, "y": 0.4, "len": 0.2},
84+
"showscale": false,
7285
"yaxis": "y3"
7386
},
7487
{

test/image/mocks/contour_nolines.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
{
22
"data":[{
3-
"contours":{"coloring":"fill","showlines":false},
4-
"z":[["1",""],["2",""],["3",""],["3",""],["4",""],["5",""],["6",""],["5",""],["2",""],["3",""],["3",""],["5",""],["6",""],["5",""],["4","1"],["4","2"],["2","3"],["1","4"],["3","5"],["2","4"],["1","3"],["3","2"],["5","3"],["4","4"],["3","3"],["2","2"],["1","1"],["2","2"],["3","3"],["4","4"],["5","6"],["4","5"],["3","4"],["2","3"],["3","2"],["2","3"],["3","4"],["3","3"],["3","2"]],
3+
"contours":{
4+
"coloring": "fill",
5+
"showlines": false,
6+
"showlabels": true
7+
},
8+
"z":[[0, 10, 0], [10, 80, 20], [0, 40, 0]],
59
"type":"contour"
610
}],
711
"layout":{
812
"showlegend":false,
913
"autosize":false,
1014
"height":400,
11-
"width":400
15+
"width":400,
16+
"xaxis": {"range": [1, 2.5]},
17+
"yaxis": {"range": [0.2, 1]}
1218
}
1319
}

test/image/mocks/contour_scatter.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,10 @@
294294
],
295295
"ncontours": 30,
296296
"showscale": false,
297-
"type": "contour"
297+
"type": "contour",
298+
"contours": {
299+
"showlabels": true
300+
}
298301
},
299302
{
300303
"x": [

0 commit comments

Comments
 (0)