Skip to content

Commit 1ff0de4

Browse files
committed
Figure.plot3d: Add a new test for missing z value
1 parent 617d955 commit 1ff0de4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pygmt/tests/test_plot3d.py

+11
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,17 @@ def test_plot3d_fail_1d_array_with_data(data, region):
8888
fig.plot3d(style="cc", fill="red", transparency=data[:, 2] * 100, **kwargs)
8989

9090

91+
def test_plot3d_fail_missing_z(data, region):
92+
"""
93+
Should raise an exception if z is missing.
94+
"""
95+
fig = Figure()
96+
with pytest.raises(GMTInvalidInput):
97+
fig.plot3d(
98+
style="c0.2c", x=data[0], y=data[1], region=region, projection="X10c"
99+
)
100+
101+
91102
@pytest.mark.mpl_image_compare
92103
def test_plot3d_projection(data, region):
93104
"""

0 commit comments

Comments
 (0)