File tree 1 file changed +15
-4
lines changed 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 13
13
14
14
from .. import Figure
15
15
from ..exceptions import GMTInvalidInput
16
+ from ..helpers .testing import check_figures_equal
16
17
17
18
18
19
TEST_DATA_DIR = os .path .join (os .path .dirname (__file__ ), "data" )
@@ -126,11 +127,21 @@ def test_plot_projection(data):
126
127
return fig
127
128
128
129
129
- @pytest . mark . mpl_image_compare
130
+ @check_figures_equal ()
130
131
def test_plot_colors (data , region ):
131
132
"Plot the data using z as sizes"
132
- fig = Figure ()
133
- fig .plot (
133
+ fig_ref , fig_test = Figure (), Figure ()
134
+ # Use single-character arguments for the reference image
135
+ fig_ref .plot (
136
+ data = POINTS_DATA ,
137
+ J = "X3i" ,
138
+ R = "/" .join (map (str , region )),
139
+ B = "af" ,
140
+ S = "c0.5c" ,
141
+ C = "cubhelix" ,
142
+ )
143
+
144
+ fig_test .plot (
134
145
x = data [:, 0 ],
135
146
y = data [:, 1 ],
136
147
color = data [:, 2 ],
@@ -140,7 +151,7 @@ def test_plot_colors(data, region):
140
151
cmap = "cubhelix" ,
141
152
frame = "af" ,
142
153
)
143
- return fig
154
+ return fig_ref , fig_test
144
155
145
156
146
157
@pytest .mark .mpl_image_compare
You can’t perform that action at this time.
0 commit comments