Skip to content

DOC: Add gallery example to show usage of map roses #4010

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

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

michaelgrund
Copy link
Member

@michaelgrund michaelgrund commented Jul 23, 2025

Description of proposed changes

This PR adds a gallery example to show the usage of map roses.

Preview:

https://pygmt-dev--4010.org.readthedocs.build/en/4010/gallery/embellishments/map_roses.html

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If wrapping a new module, open a 'Wrap new GMT module' issue and submit reasonably-sized PRs.
  • If adding new functionality, add an example to docstrings or tutorials.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash command is:

  • /format: automatically format and lint the code

@michaelgrund michaelgrund added the documentation Improvements or additions to documentation label Jul 23, 2025
@michaelgrund michaelgrund changed the title DOC: Add gallery example to usage of map roses DOC: Add gallery example to show usage of map roses Jul 23, 2025
@michaelgrund michaelgrund added the needs review This PR has higher priority and needs review. label Jul 23, 2025
@yvonnefroehlich
Copy link
Member

yvonnefroehlich commented Jul 23, 2025

Cool - will look at the plots in detail later on.

But just want to mention that there is an issue suggesting to implemente a high-level methods for plotting a directional rose etc. at #2831 (similar to plot / plot3d at #2797). Not sure if there is any progress at the moment, but would be good to check to avoid double work 🙃. As the script contains various plots, it looks like you put already some work into this PR.

@seisman
Copy link
Member

seisman commented Jul 24, 2025

But just want to mention that there is an issue suggesting to implemente a high-level methods for plotting a directional rose etc. at #2831 (similar to plot / plot3d at #2797). Not sure if there is any progress at the moment

It's still waiting for the new alias system.

Co-authored-by: Yvonne Fröhlich <[email protected]>
@seisman
Copy link
Member

seisman commented Jul 24, 2025

Instead of plotting eight roses in eight subplots, maybe it's better to plot eight roses in a single basemap?

michaelgrund and others added 2 commits July 28, 2025 11:40
Co-authored-by: Yvonne Fröhlich <[email protected]>
Comment on lines +2 to +3
Directional map roses
=========
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Directional map roses
=========
Directional map roses
=====================

Comment on lines +73 to +74
# Fancy, 2.5 cm wide rose of level 2 abels indicating the different
# directions
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# Fancy, 2.5 cm wide rose of level 2 abels indicating the different
# directions
# Fancy, 2.5 cm wide rose of level 2 and labels indicating the different
# directions

Comment on lines +82 to +83
# Fancy, 2.5 cm wide rose of level 3 abels indicating the different
# directions
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# Fancy, 2.5 cm wide rose of level 3 abels indicating the different
# directions
# Fancy, 2.5 cm wide rose of level 3 and labels indicating the different
# directions

:meth:`pygmt.Figure.coast` methods is used to add a directional map
rose to a map. This example shows how such a map rose can be customized:

- position: **g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**. Set the position
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- position: **g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**. Set the position
- position: **g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**. Set the position

@seisman
Copy link
Member

seisman commented Jul 29, 2025

@michaelgrund @yvonnefroehlich I've opened PR #4025 which adds the Figure.directional_rose method. With that feature added, this gallery example can be greatly simplified. So better to focus on that PR first?

@michaelgrund
Copy link
Member Author

@michaelgrund @yvonnefroehlich I've opened PR #4025 which adds the Figure.directional_rose method. With that feature added, this gallery example can be greatly simplified. So better to focus on that PR first?

Great, will wait until #4025 is merged!

@seisman seisman removed the needs review This PR has higher priority and needs review. label Jul 30, 2025
@seisman seisman marked this pull request as draft July 30, 2025 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants