Skip to content

Commit 27a873d

Browse files
committed
use cm instead of inches as unit
1 parent 72251b1 commit 27a873d

File tree

1 file changed

+24
-21
lines changed

1 file changed

+24
-21
lines changed

pygmt/tests/test_plot3d.py

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def test_plot3d_red_circles_zscale(data, region):
3939
zscale=5,
4040
perspective=[225, 30],
4141
region=region,
42-
projection="X4i",
42+
projection="X10c",
4343
style="c0.2c",
4444
color="red",
4545
frame=["afg", "zafg"],
@@ -49,16 +49,16 @@ def test_plot3d_red_circles_zscale(data, region):
4949

5050
@pytest.mark.mpl_image_compare
5151
def test_plot3d_red_circles_zsize(data, region):
52-
"Plot the 3D data in red circles passing in vectors and setting zsize = 3i"
52+
"Plot the 3D data in red circles passing in vectors and setting zsize = 6c"
5353
fig = Figure()
5454
fig.plot3d(
5555
x=data[:, 0],
5656
y=data[:, 1],
5757
z=data[:, 2],
58-
zsize="3i",
58+
zsize="6c",
5959
perspective=[225, 30],
6060
region=region,
61-
projection="X4i",
61+
projection="X10c",
6262
style="c0.2c",
6363
color="red",
6464
frame=["afg", "zafg"],
@@ -73,13 +73,13 @@ def test_plot3d_fail_no_data(data, region):
7373
fig = Figure()
7474
with pytest.raises(GMTInvalidInput):
7575
fig.plot3d(
76-
region=region, projection="X4i", style="c0.2c", color="red", frame="afg"
76+
region=region, projection="X10c", style="c0.2c", color="red", frame="afg"
7777
)
7878
with pytest.raises(GMTInvalidInput):
7979
fig.plot3d(
8080
x=data[:, 0],
8181
region=region,
82-
projection="X4i",
82+
projection="X10c",
8383
style="c0.2c",
8484
color="red",
8585
frame="afg",
@@ -88,7 +88,7 @@ def test_plot3d_fail_no_data(data, region):
8888
fig.plot3d(
8989
y=data[:, 0],
9090
region=region,
91-
projection="X4i",
91+
projection="X10c",
9292
style="c0.2c",
9393
color="red",
9494
frame="afg",
@@ -101,7 +101,7 @@ def test_plot3d_fail_no_data(data, region):
101101
z=data[:, 2],
102102
data=data,
103103
region=region,
104-
projection="X4i",
104+
projection="X10c",
105105
style="c0.2c",
106106
color="red",
107107
frame="afg",
@@ -136,7 +136,7 @@ def test_plot3d_projection(data, region):
136136
zscale=5,
137137
perspective=[225, 30],
138138
region=region,
139-
projection="R270/4i",
139+
projection="R270/10c",
140140
style="s1c",
141141
color="green",
142142
frame=["ag", "zag"],
@@ -158,7 +158,7 @@ def test_plot3d_colors(data, region):
158158
perspective=[225, 30],
159159
color=data[:, 2],
160160
region=region,
161-
projection="X3i",
161+
projection="X6c",
162162
style="c0.5c",
163163
cmap="cubhelix",
164164
frame=["afg", "zafg"],
@@ -180,9 +180,10 @@ def test_plot3d_sizes(data, region):
180180
perspective=[225, 30],
181181
sizes=0.5 * data[:, 2],
182182
region=region,
183-
projection="X4i",
183+
projection="X10c",
184184
# Using inches instead of cm because of upstream bug at
185-
# https://github.com/GenericMappingTools/gmt/issues/4386
185+
# https://github.com/GenericMappingTools/gmt/issues/4386#
186+
# TODO check if still valid
186187
style="ui",
187188
color="blue",
188189
frame=["af", "zaf"],
@@ -205,9 +206,10 @@ def test_plot3d_colors_sizes(data, region):
205206
color=data[:, 2],
206207
sizes=0.5 * data[:, 2],
207208
region=region,
208-
projection="X3i",
209+
projection="X6c",
209210
# Using inches instead of cm because of upstream bug at
210211
# https://github.com/GenericMappingTools/gmt/issues/4386
212+
# TODO check if still valid
211213
style="ui",
212214
cmap="copper",
213215
frame=["af", "zaf"],
@@ -228,12 +230,13 @@ def test_plot3d_colors_sizes_proj(data, region):
228230
zscale=5,
229231
perspective=[225, 30],
230232
region=region,
231-
projection="M10i",
233+
projection="M20c",
232234
frame=["af", "zaf"],
233235
color=data[:, 2],
234236
sizes=data[:, 2],
235237
# Using inches instead of cm because of upstream bug at
236238
# https://github.com/GenericMappingTools/gmt/issues/4386
239+
# TODO check if still valid
237240
style="ui",
238241
cmap="copper",
239242
)
@@ -284,7 +287,7 @@ def test_plot3d_transparency():
284287
style="u0.2c",
285288
color="blue",
286289
region=[0, 10, 0, 10, 10, 90],
287-
projection="X4i",
290+
projection="X10c",
288291
zscale=0.1,
289292
frame=True,
290293
perspective=[135, 30],
@@ -310,7 +313,7 @@ def test_plot3d_varying_transparency():
310313
style="o0.2c+B5",
311314
color="blue",
312315
region=[0, 10, 0, 10, 10, 90],
313-
projection="X4i",
316+
projection="X10c",
314317
zscale=0.1,
315318
frame=True,
316319
perspective=[135, 30],
@@ -337,7 +340,7 @@ def test_plot3d_sizes_colors_transparencies():
337340
y=y,
338341
z=z,
339342
region=[0, 10, 0, 10, 10, 90],
340-
projection="X4i",
343+
projection="X10c",
341344
zscale=0.1,
342345
perspective=[135, 30],
343346
frame=True,
@@ -361,7 +364,7 @@ def test_plot3d_matrix(data, region):
361364
zscale=5,
362365
perspective=[225, 30],
363366
region=region,
364-
projection="M10i",
367+
projection="M20c",
365368
style="c1c",
366369
color="#aaaaaa",
367370
frame=["a", "za"],
@@ -381,7 +384,7 @@ def test_plot3d_matrix_color(data, region):
381384
zscale=5,
382385
perspective=[225, 30],
383386
region=region,
384-
projection="X5i",
387+
projection="X10c",
385388
style="c0.5c",
386389
cmap="rainbow",
387390
columns=[0, 1, 2, 2],
@@ -401,7 +404,7 @@ def test_plot3d_from_file(region):
401404
zscale=5,
402405
perspective=[225, 30],
403406
region=region,
404-
projection="X10i",
407+
projection="X20c",
405408
style="d1c",
406409
color="yellow",
407410
frame=["af", "zaf"],
@@ -430,7 +433,7 @@ def test_plot3d_vectors():
430433
perspective=[225, 30],
431434
direction=(azimuth, lengths),
432435
region=[-2, 2, -2, 2, -2, 2],
433-
projection="X4i",
436+
projection="X10c",
434437
style="V1c+e",
435438
color="black",
436439
frame=["af", "zaf"],

0 commit comments

Comments
 (0)