We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9aa3d36 commit c1407f5Copy full SHA for c1407f5
pygmt/base_plotting.py
@@ -1167,8 +1167,10 @@ def basemap(self, **kwargs):
1167
1168
"""
1169
kwargs = self._preprocess(**kwargs)
1170
- if not ("B" in kwargs or "L" in kwargs or "T" in kwargs):
1171
- raise GMTInvalidInput("At least one of B, L, or T must be specified.")
+ if not ("B" in kwargs or "L" in kwargs or "Td" in kwargs or "Tm" in kwargs):
+ raise GMTInvalidInput(
1172
+ "At least one of frame, map_scale, compass, or rose must be specified."
1173
+ )
1174
with Session() as lib:
1175
lib.call_module("basemap", build_arg_string(kwargs))
1176
pygmt/tests/test_basemap.py
@@ -80,3 +80,25 @@ def test_basemap_aliases():
80
fig = Figure()
81
fig.basemap(region=[0, 360, -90, 90], projection="W7i", frame=True)
82
return fig
83
+
84
85
+@check_figures_equal()
86
+def test_basemap_rose():
87
+ "Create a map with coast and use basemap to add a rose"
88
+ fig_ref, fig_test = Figure(), Figure()
89
+ fig_ref.coast(R="127.5/128.5/26/27", W="1/0.5p")
90
+ fig_ref.basemap(Td="jBR+w5c")
91
+ fig_test.coast(region=[127.5, 128.5, 26, 27], shorelines="1/0.5p")
92
+ fig_test.basemap(rose="jBR+w5c")
93
+ return fig_ref, fig_test
94
95
96
97
+def test_basemap_compass():
98
+ "Create a map with coast and use basemap to add a compass"
99
100
101
+ fig_ref.basemap(Tm="jBR+w5c+d11.5")
102
103
+ fig_test.basemap(compass="jBR+w5c+d11.5")
104
0 commit comments