Skip to content

Commit d39285e

Browse files
authored
Frame: Allow setting 'axis' and 'zaxis' simultaneously (#4498)
1 parent a3c02a2 commit d39285e

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

pygmt/params/frame.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,11 @@ class Frame(BaseParam):
175175

176176
#: Specify the attributes for axes by an :class:`Axis` object.
177177
#:
178-
#: The attributes for each axis can be specified in two ways: (1) specifying the
179-
#: same attributes for all axes using the ``axis`` parameter; (2) specifying the
180-
#: attributes for each axis separately using the ``xaxis``, ``yaxis``, ``zaxis``
181-
#: parameter for the x-, y, and z-axes, respectively.
178+
#: The attributes for x and y axes can be specified in two ways: (1) specifying the
179+
#: same attributes for both axes using the ``axis`` parameter; (2) specifying the
180+
#: attributes for each axis separately using the ``xaxis`` and ``yaxis`` parameters.
181+
#: The attributes for z-axis can only be specified separately using the ``zaxis``
182+
#: parameter.
182183
#:
183184
#: GMT uses the notion of primary (the default) and secondary axes, while secondary
184185
#: axes are optional and mostly used for time axes annotations. To specify the
@@ -197,13 +198,10 @@ def _validate(self):
197198
Validate the parameters of the Frame class.
198199
"""
199200
if self.axis is not None and any(
200-
[self.xaxis, self.yaxis, self.zaxis, self.xaxis2, self.yaxis2, self.zaxis2]
201+
[self.xaxis, self.yaxis, self.xaxis2, self.yaxis2]
201202
):
202203
raise GMTParameterError(
203-
conflicts_with=(
204-
"axis",
205-
["xaxis", "yaxis", "zaxis", "xaxis2", "yaxis2", "zaxis2"],
206-
),
204+
conflicts_with=("axis", ["xaxis", "yaxis", "xaxis2", "yaxis2"]),
207205
reason="Either 'axis' or the individual axis parameters can be set, but not both.",
208206
)
209207

0 commit comments

Comments
 (0)