Skip to content

Figure.directional_rose/Figure.magnetic_rose: Set the default position to the top right#4702

Merged
seisman merged 3 commits into
mainfrom
rose/posistion
Jun 30, 2026
Merged

Figure.directional_rose/Figure.magnetic_rose: Set the default position to the top right#4702
seisman merged 3 commits into
mainfrom
rose/posistion

Conversation

@seisman

@seisman seisman commented Jun 29, 2026

Copy link
Copy Markdown
Member

Description of proposed changes

For GMT<=6.6.0, the position argument is required when plotting directional or magnetic roses. When implementing Figure.directional_rose and Figure.magnetic_rose in PyGMT, we decided to set the default position to the "bottom left" corner.

In a recent PR GenericMappingTools/gmt#9074, the default position was changed to "Top Right." As a result, the default positions will be inconsistent between GMT and PyGMT.

Fortunately, Figure.directional_rose and Figure.magnetic_rose were added recently and have not yet been released. This gives us the opportunity to change the default behavior without breaking backward compatibility.

This PR updates the default position.

@seisman seisman added this to the 0.19.0 milestone Jun 29, 2026
@seisman seisman added maintenance Boring but important stuff for the core devs needs review This PR has higher priority and needs review. labels Jun 29, 2026
@seisman seisman closed this Jun 29, 2026
@seisman seisman reopened this Jun 29, 2026
@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary of changed images

This is an auto-generated report of images that have changed on the DVC remote

Status Path
modified pygmt/tests/baseline/test_directional_rose.png
modified pygmt/tests/baseline/test_directional_rose_fancy.png
modified pygmt/tests/baseline/test_magnetic_rose.png

Image diff(s)

Details

Added images

Modified images

Path Old New
test_directional_rose.png
test_directional_rose_fancy.png
test_magnetic_rose.png

Report last updated at commit 8e9e93e

@yvonnefroehlich yvonnefroehlich left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree the default position should be consistent across GMT and PyGMT.

Comment thread examples/gallery/embellishments/magnetic_rose.py
@seisman seisman merged commit 392e5f9 into main Jun 30, 2026
23 checks passed
@seisman seisman deleted the rose/posistion branch June 30, 2026 01:50
@seisman seisman removed the needs review This PR has higher priority and needs review. label Jun 30, 2026
@yvonnefroehlich

Copy link
Copy Markdown
Member

Seems like we have to do similar changes to Figure.inset (xref GenericMappingTools/gmt#9077), if we want consistent default positions for the plotting embellishments.

@yvonnefroehlich yvonnefroehlich mentioned this pull request Jul 3, 2026
41 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants