Conversation
There was a problem hiding this comment.
I feel it would be good to add an alias for -S,
-S[+aangle][+c|n][+r][+s][+xlabel][+yunit]
as I realized that this flags allows to set x and y labels in case frame (-B) cannot be used, e.g., if equalsize (-L) is used.
I am wondering if adding an alias, e.g., appearance, using the old alias system still makes sense or if we should do this directly using the new alias system to introduce aliases for the single modifieres.
d846477 to
a352945
Compare
0607414 to
c892202
Compare
…cify colorbar position and properties
c892202 to
8bdb98e
Compare
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
pygmt/src/colorbar.py
Outdated
| nan_rectangle: bool | str = False, | ||
| nan_rectangle_position: Literal["start", "end"] | None = None, |
There was a problem hiding this comment.
Perhaps shorter names nan and nan_position are better?
There was a problem hiding this comment.
I think nan_position (or nan_side) is fine.
There was a problem hiding this comment.
I've renamed them to nan/nan_position in 57f8c39.
pygmt/src/colorbar.py
Outdated
| sidebar_triangles: bool | Literal["foreground", "background"] = False, | ||
| sidebar_triangles_height: float | None = None, |
There was a problem hiding this comment.
The names are also a little too long. It's also unclear what sidebar means. What about fg_triangle/bg_triangle and triangle_height?
There was a problem hiding this comment.
Agree that these names are a bit long. fg_trinagle and bg_triangle would mean we have two parameters, correct? Maybe cb_triangles; "cb" for "colorbar", which is clearer as "sidebar"?
There was a problem hiding this comment.
I feel cb_triangles is a bad name for two reasons:
- It's unclear what
cbstands for - This is a parameter for
Figure.colorbar, so the prefixcb(short forcolorbar) is a little duplicate
There was a problem hiding this comment.
What about fgcolor/bgcolor, which fgcolor=True/bgcolor=True means draw a triangle for foreground/background color.
fgcolor/bgcolor are also used in the Pattern class, but it takes a color, not a boolean value.
Edit: fgcolor/bgcolor may be good names, but it would be unclear what triangle_height means.
So, I still prefer fg_triangle/bg_triangle/triangle_height.
There was a problem hiding this comment.
I've renamed them to fg_triangle/bg_triangle/triangle_height in 405383c.
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
|
/format |
[g|j|J|n|x]<refpoint>[+j<justify>][+o<dx>[/<dy>]]position+w<length>[/<width>]]length/widthsizesize[+e[b|f][<length>]]fg_triangle/bg_triangle/triangle_heighttrianglestriangles[+h|v]oriention="horizontal"or "vertical"horizontal,verticalhorizontal[+n|N[<txt>]]nan/nan_positionnannan[+r]reversereverseReferences
Preview: https://pygmt-dev--4048.org.readthedocs.build/en/4048/api/generated/pygmt.Figure.colorbar.html#pygmt.Figure.colorbar