Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure.colorbar: Add aliases for L and Z #2357

Merged
merged 16 commits into from
Mar 4, 2023
Merged
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions pygmt/src/colorbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@

@fmt_docstring
@use_alias(
R="region",
J="projection",
B="frame",
C="cmap",
D="position",
F="box",
G="truncate",
I="shading",
W="scale",
J="projection",
L="equalsize",
R="region",
V="verbose",
W="scale",
Z="zfile",
c="panel",
p="perspective",
t="transparency",
Expand Down Expand Up @@ -97,6 +99,22 @@ def colorbar(self, **kwargs):
used. Alternatively, set ``shading=[low, high]`` to specify an
asymmetric intensity range from *low* to *high*. [Default is no
illumination].
equalsize : int or float or str
[**i**]\ [*gap*].
Equal-sized color rectangles. By default, the rectangles are scaled
according to the z-range in the CPT (see also ``zfile``). If *gap* is
appended and the CPT is discrete each annotation is centered on each
rectangle, using the lower boundary z-value for the annotation. If
**i** is prepended the interval range is annotated instead. If
``shading`` is used each rectangle will have its constant color
modified by the specified intensity.
zfile : str
File with colorbar-width per color entry. By default, the width of the
entry is scaled to the color range, i.e., z = 0-100 gives twice the
width as z = 100-150 (see also ``equalsize``). **Note**: The widths
may be in plot distance units or given as relative fractions and will
be automatically scaled so that the sum of the widths equals the
requested colorbar length.
{verbose}
{panel}
{perspective}
Expand Down