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

Open
wants to merge 3 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 <94163266+yvonnefroehlich@users.noreply.github.com>
@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?

independent) code. Choose from vertical **T**\(op), **M**\(iddle), or
**B**\(ottom) and horizontal **L**\(eft), **C**\(entre), or **R**\(ight).

- label: **+l**[w,e,s,n]: Label the cardinal points W,E,S,N. Optionally,
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
- label: **+l**[w,e,s,n]: Label the cardinal points W,E,S,N. Optionally,
- label: **+l**\[w,e,s,n]: Label the cardinal points W,E,S,N. Optionally,

- width: **+w**: Set the width of the rose in plot coordinates (append
**i** (inch), **cm** (centimeters), or **p** (points).

- fanciness: **+f**[level]: Get a “fancy” rose, and optionally specify the
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
- fanciness: **+f**[level]: Get afancyrose, and optionally specify the
- fanciness: **+f** \[level]: Get afancyrose, and optionally specify the

- width: **+w**: Set the width of the rose in plot coordinates (append
**i** (inch), **cm** (centimeters), or **p** (points).

- fanciness: **+f**[level]: Get a “fancy” rose, and optionally specify the
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
- fanciness: **+f**[level]: Get a fancy rose, and optionally specify the
- fanciness: **+f**[level]: 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 eight minor orientations WNW-ESE, NNW-SSE, NNE-SSW, and ENE-WSW
[default is 1].
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
[default is 1].
[Default is 1].

Comment on lines +24 to +28
- fanciness: **+f**[level]: 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 eight minor orientations WNW-ESE, NNW-SSE, NNE-SSW, and ENE-WSW
[default is 1].
Copy link
Member

Choose a reason for hiding this comment

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

What's about having a list here?

Suggested change
- fanciness: **+f**[level]: Get afancyrose, 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 eight minor orientations WNW-ESE, NNW-SSE, NNE-SSW, and ENE-WSW
[default is 1].
- fanciness: **+f**[level]: Get a "fancy" rose, and optionally specify the
level of fanciness.
- ``"1"``: Draws the two principal E-W, N-S orientations`.
- ``"2"``: Adds the two intermediate NW-SE and NE-SW orientations.
- ``"3"``: Adds the four minor orientations WNW-ESE, NNW-SSE, NNE-SSW, and ENE-WSW.
[Default is ``"1"``].

- fanciness: **+f**[level]: 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 eight minor orientations WNW-ESE, NNW-SSE, NNE-SSW, and ENE-WSW
Copy link
Member

Choose a reason for hiding this comment

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

Hm, I think to be consistent with "two pricipal orientations", it should be "four minor orientations".

Suggested change
the eight minor orientations WNW-ESE, NNW-SSE, NNE-SSW, and ENE-WSW
the four minor orientations WNW-ESE, NNW-SSE, NNE-SSW, and ENE-WSW

Comment on lines +34 to +35
- label: **+l**[w,e,s,n]: Label the cardinal points W,E,S,N. Optionally,
append your own four comma-separated strings to override the default.
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
- label: **+l**[w,e,s,n]: Label the cardinal points W,E,S,N. Optionally,
append your own four comma-separated strings to override the default.
- label: **+l**\[w,e,s,n]: Label the cardinal points W,E,S,N. Optionally,
append your own four labels as comma-separated strings to override the default.

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 needs review This PR has higher priority and needs review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants