@@ -46,7 +46,7 @@ def test_plot_red_circles(data, region):
46
46
region = region ,
47
47
projection = "X10c" ,
48
48
style = "c0.2c" ,
49
- color = "red" ,
49
+ fill = "red" ,
50
50
frame = "afg" ,
51
51
)
52
52
return fig
@@ -59,15 +59,15 @@ def test_plot_fail_no_data(data, region):
59
59
fig = Figure ()
60
60
with pytest .raises (GMTInvalidInput ):
61
61
fig .plot (
62
- region = region , projection = "X10c" , style = "c0.2c" , color = "red" , frame = "afg"
62
+ region = region , projection = "X10c" , style = "c0.2c" , fill = "red" , frame = "afg"
63
63
)
64
64
with pytest .raises (GMTInvalidInput ):
65
65
fig .plot (
66
66
x = data [:, 0 ],
67
67
region = region ,
68
68
projection = "X10c" ,
69
69
style = "c0.2c" ,
70
- color = "red" ,
70
+ fill = "red" ,
71
71
frame = "afg" ,
72
72
)
73
73
with pytest .raises (GMTInvalidInput ):
@@ -76,7 +76,7 @@ def test_plot_fail_no_data(data, region):
76
76
region = region ,
77
77
projection = "X10c" ,
78
78
style = "c0.2c" ,
79
- color = "red" ,
79
+ fill = "red" ,
80
80
frame = "afg" ,
81
81
)
82
82
# Should also fail if given too much data
@@ -88,26 +88,26 @@ def test_plot_fail_no_data(data, region):
88
88
region = region ,
89
89
projection = "X10c" ,
90
90
style = "c0.2c" ,
91
- color = "red" ,
91
+ fill = "red" ,
92
92
frame = "afg" ,
93
93
)
94
94
95
95
96
96
def test_plot_fail_1d_array_with_data (data , region ):
97
97
"""
98
- Should raise an exception if array color , size, intensity and transparency
98
+ Should raise an exception if array fill , size, intensity and transparency
99
99
are used with matrix.
100
100
"""
101
101
fig = Figure ()
102
102
kwargs = dict (data = data , region = region , projection = "X10c" , frame = "afg" )
103
103
with pytest .raises (GMTInvalidInput ):
104
- fig .plot (style = "c0.2c" , color = data [:, 2 ], ** kwargs )
104
+ fig .plot (style = "c0.2c" , fill = data [:, 2 ], ** kwargs )
105
105
with pytest .raises (GMTInvalidInput ):
106
- fig .plot (style = "cc" , size = data [:, 2 ], color = "red" , ** kwargs )
106
+ fig .plot (style = "cc" , size = data [:, 2 ], fill = "red" , ** kwargs )
107
107
with pytest .raises (GMTInvalidInput ):
108
- fig .plot (style = "c0.2c" , color = "red" , intensity = data [:, 2 ], ** kwargs )
108
+ fig .plot (style = "c0.2c" , fill = "red" , intensity = data [:, 2 ], ** kwargs )
109
109
with pytest .raises (GMTInvalidInput ):
110
- fig .plot (style = "c0.2c" , color = "red" , transparency = data [:, 2 ] * 100 , ** kwargs )
110
+ fig .plot (style = "c0.2c" , fill = "red" , transparency = data [:, 2 ] * 100 , ** kwargs )
111
111
112
112
113
113
@pytest .mark .mpl_image_compare
@@ -122,7 +122,7 @@ def test_plot_projection(data):
122
122
region = "g" ,
123
123
projection = "R270/10c" ,
124
124
style = "s0.2c" ,
125
- color = "green" ,
125
+ fill = "green" ,
126
126
frame = "ag" ,
127
127
)
128
128
return fig
@@ -131,13 +131,13 @@ def test_plot_projection(data):
131
131
@pytest .mark .mpl_image_compare
132
132
def test_plot_colors (data , region ):
133
133
"""
134
- Plot the data using z as colors .
134
+ Plot the data using z as fills .
135
135
"""
136
136
fig = Figure ()
137
137
fig .plot (
138
138
x = data [:, 0 ],
139
139
y = data [:, 1 ],
140
- color = data [:, 2 ],
140
+ fill = data [:, 2 ],
141
141
region = region ,
142
142
projection = "X10c" ,
143
143
style = "c0.5c" ,
@@ -160,7 +160,7 @@ def test_plot_sizes(data, region):
160
160
region = region ,
161
161
projection = "X10c" ,
162
162
style = "cc" ,
163
- color = "blue" ,
163
+ fill = "blue" ,
164
164
frame = "af" ,
165
165
)
166
166
return fig
@@ -169,13 +169,13 @@ def test_plot_sizes(data, region):
169
169
@pytest .mark .mpl_image_compare
170
170
def test_plot_colors_sizes (data , region ):
171
171
"""
172
- Plot the data using z as sizes and colors .
172
+ Plot the data using z as sizes and fills .
173
173
"""
174
174
fig = Figure ()
175
175
fig .plot (
176
176
x = data [:, 0 ],
177
177
y = data [:, 1 ],
178
- color = data [:, 2 ],
178
+ fill = data [:, 2 ],
179
179
size = 0.5 * data [:, 2 ],
180
180
region = region ,
181
181
projection = "X10c" ,
@@ -189,14 +189,14 @@ def test_plot_colors_sizes(data, region):
189
189
@pytest .mark .mpl_image_compare
190
190
def test_plot_colors_sizes_proj (data , region ):
191
191
"""
192
- Plot the data using z as sizes and colors with a projection.
192
+ Plot the data using z as sizes and fills with a projection.
193
193
"""
194
194
fig = Figure ()
195
195
fig .coast (region = region , projection = "M15c" , frame = "af" , water = "skyblue" )
196
196
fig .plot (
197
197
x = data [:, 0 ],
198
198
y = data [:, 1 ],
199
- color = data [:, 2 ],
199
+ fill = data [:, 2 ],
200
200
size = 0.5 * data [:, 2 ],
201
201
style = "cc" ,
202
202
cmap = "copper" ,
@@ -221,7 +221,7 @@ def test_plot_varying_intensity():
221
221
projection = "X10c/2c" ,
222
222
frame = ["S" , "xaf+lIntensity" ],
223
223
style = "c0.25c" ,
224
- color = "blue" ,
224
+ fill = "blue" ,
225
225
intensity = intensity ,
226
226
)
227
227
return fig
@@ -243,7 +243,7 @@ def test_plot_transparency():
243
243
projection = "X10c" ,
244
244
frame = True ,
245
245
style = "c0.2c" ,
246
- color = "blue" ,
246
+ fill = "blue" ,
247
247
transparency = 80.0 ,
248
248
)
249
249
return fig
@@ -266,7 +266,7 @@ def test_plot_varying_transparency():
266
266
projection = "X10c" ,
267
267
frame = True ,
268
268
style = "c0.2c" ,
269
- color = "blue" ,
269
+ fill = "blue" ,
270
270
transparency = z ,
271
271
)
272
272
return fig
@@ -275,11 +275,11 @@ def test_plot_varying_transparency():
275
275
@pytest .mark .mpl_image_compare
276
276
def test_plot_sizes_colors_transparencies ():
277
277
"""
278
- Plot the data with varying sizes and colors using z as transparency.
278
+ Plot the data with varying sizes and fills using z as transparency.
279
279
"""
280
280
x = np .arange (1.0 , 10.0 )
281
281
y = np .arange (1.0 , 10.0 )
282
- color = np .arange (1 , 10 ) * 0.15
282
+ fill = np .arange (1 , 10 ) * 0.15
283
283
size = np .arange (1 , 10 ) * 0.2
284
284
transparency = np .arange (1 , 10 ) * 10
285
285
@@ -291,7 +291,7 @@ def test_plot_sizes_colors_transparencies():
291
291
projection = "X10c" ,
292
292
frame = True ,
293
293
style = "cc" ,
294
- color = color ,
294
+ fill = fill ,
295
295
size = size ,
296
296
cmap = "gray" ,
297
297
transparency = transparency ,
@@ -300,8 +300,8 @@ def test_plot_sizes_colors_transparencies():
300
300
301
301
302
302
@pytest .mark .mpl_image_compare (filename = "test_plot_matrix.png" )
303
- @pytest .mark .parametrize ("color " , ["#aaaaaa" , 170 ])
304
- def test_plot_matrix (data , color ):
303
+ @pytest .mark .parametrize ("fill " , ["#aaaaaa" , 170 ])
304
+ def test_plot_matrix (data , fill ):
305
305
"""
306
306
Plot the data passing in a matrix and specifying columns.
307
307
"""
@@ -311,7 +311,7 @@ def test_plot_matrix(data, color):
311
311
region = [10 , 70 , - 5 , 10 ],
312
312
projection = "M15c" ,
313
313
style = "cc" ,
314
- color = color ,
314
+ fill = fill ,
315
315
frame = "a" ,
316
316
incols = "0,1,2+s0.5" ,
317
317
)
@@ -346,7 +346,7 @@ def test_plot_from_file(region):
346
346
region = region ,
347
347
projection = "X10c" ,
348
348
style = "d1c" ,
349
- color = "yellow" ,
349
+ fill = "yellow" ,
350
350
frame = True ,
351
351
incols = [0 , 1 ],
352
352
)
@@ -370,7 +370,7 @@ def test_plot_vectors():
370
370
region = "-2/2/-2/2" ,
371
371
projection = "X10c" ,
372
372
style = "V0.2c+e+n" ,
373
- color = "black" ,
373
+ fill = "black" ,
374
374
frame = "af" ,
375
375
)
376
376
return fig
0 commit comments