Skip to content

Figure.directional_rose: Add parameter 'upright_labels' to force readable labels for rotated projections - #4867

Open
seisman wants to merge 1 commit into
mainfrom
directional_rose/upright_labels
Open

Figure.directional_rose: Add parameter 'upright_labels' to force readable labels for rotated projections#4867
seisman wants to merge 1 commit into
mainfrom
directional_rose/upright_labels

Conversation

@seisman

@seisman seisman commented Aug 27, 2026

Copy link
Copy Markdown
Member

Description of proposed changes

Implement the -Td+F. The official documentation says:

+f[level] to get a “fancy” rose, and optionally specify the level of fanciness. Level 1 draws the two principal E-W, N-S orientations, 2 adds the two intermediate NW-SE and NE-SW orientations, while 3 adds the four minor orientations WNW-ESE, NNW-SSE, NNE-SSW, and ENE-WSW [default is 1]. Use +F to force the labels to be readable from the south if the projection has extensive rotation of the directions.

In this PR, I choose to use upright_labels for the parameter name.

Related to #4302.

Examples:

import pygmt
fig = pygmt.Figure()
fig.basemap(region=[-180, 180, 60, 90], projection="S0/90/6c", frame=True)
fig.directional_rose(position="TC", width=2, fancy=1, labels=True)
fig.shift_origin(xshift="w+1")
fig.basemap(region=[-180, 180, 60, 90], projection="S0/90/6c", frame=True)
fig.directional_rose(
    position="TC", width=2, fancy=1, labels=True, upright_labels=True
)
fig.show()
image

@seisman seisman added enhancement Improving an existing feature needs review This PR has higher priority and needs review. labels Aug 27, 2026
@seisman seisman added this to the 0.20.0 milestone Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improving an existing feature needs review This PR has higher priority and needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant