Skip to content

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

Merged
seisman merged 2 commits into
mainfrom
directional_rose/upright_labels
Sep 3, 2026
Merged

Figure.directional_rose: Add parameter 'upright_labels' to force readable labels for rotated projections#4867
seisman merged 2 commits 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
@seisman seisman added final review call This PR requires final review and approval from a second reviewer and removed needs review This PR has higher priority and needs review. labels Sep 2, 2026
@seisman
seisman requested review from a team and a lite review from Copilot September 2, 2026 16:07

This comment was marked as low quality.

@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Sep 3, 2026
@seisman
seisman merged commit f87b1bd into main Sep 3, 2026
19 of 22 checks passed
@seisman
seisman deleted the directional_rose/upright_labels branch September 3, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improving an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants