Skip to content

Add gallery example for directional roses#4010

Merged
seisman merged 47 commits into
mainfrom
gallery-map-roses
Apr 10, 2026
Merged

Add gallery example for directional roses#4010
seisman merged 47 commits into
mainfrom
gallery-map-roses

Conversation

@michaelgrund
Copy link
Copy Markdown
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/directional_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
Copy Markdown
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.

Comment thread examples/gallery/embellishments/map_roses.py Outdated
@seisman
Copy link
Copy Markdown
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
Copy Markdown
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?

Comment thread examples/gallery/embellishments/map_roses.py Outdated
Comment thread examples/gallery/embellishments/map_roses.py Outdated
Comment thread examples/gallery/embellishments/map_roses.py Outdated
Comment thread examples/gallery/embellishments/map_roses.py Outdated
Comment thread examples/gallery/embellishments/map_roses.py Outdated
Comment thread examples/gallery/embellishments/map_roses.py Outdated
Comment thread examples/gallery/embellishments/map_roses.py Outdated
michaelgrund and others added 2 commits July 28, 2025 11:40
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
Comment thread examples/gallery/embellishments/map_roses.py Outdated
Comment thread examples/gallery/embellishments/map_roses.py Outdated
Comment thread examples/gallery/embellishments/map_roses.py Outdated
Comment thread examples/gallery/embellishments/map_roses.py Outdated
Comment thread examples/gallery/embellishments/map_roses.py Outdated
Comment thread examples/gallery/embellishments/map_roses.py Outdated
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
Comment thread examples/gallery/embellishments/map_roses.py Outdated
Comment thread examples/gallery/embellishments/map_roses.py Outdated
Comment thread examples/gallery/embellishments/map_roses.py Outdated
Comment thread examples/gallery/embellishments/map_roses.py Outdated
@seisman
Copy link
Copy Markdown
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
Copy Markdown
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
@seisman seisman added this to the 0.18.0 milestone Sep 18, 2025
@seisman seisman modified the milestones: 0.18.0, 0.19.0 Dec 29, 2025
@yvonnefroehlich yvonnefroehlich mentioned this pull request Jan 6, 2026
30 tasks
@seisman
Copy link
Copy Markdown
Member

seisman commented Jan 23, 2026

@michaelgrund The Figure.directional_rose method in PR #4025 has been merged. You may want to revisit this example if you're still interested.

Comment thread examples/gallery/embellishments/map_roses.py Outdated
Comment thread examples/gallery/embellishments/map_roses.py Outdated
michaelgrund and others added 3 commits February 5, 2026 15:20
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
Comment thread examples/gallery/embellishments/map_roses.py Outdated
Comment thread examples/gallery/embellishments/map_roses.py Outdated
Comment thread examples/gallery/embellishments/map_roses.py
@seisman
Copy link
Copy Markdown
Member

seisman commented Feb 7, 2026

I feel it would be better if we could find all GMT parameters (e.g., FONT_TITLE) that control the appearance of map roses and provide dedicated parameters for them. For example, it's sometimes confusing that the label font is controlled by FONT_TITLE rather than FONT_LABEL. It would be more user-friendly if we can provide a parameter like font_label (or labe_font).

Anyway, we can finish this gallery example first, then implement these parameters and update the gallery example in separate PRs.

@seisman
Copy link
Copy Markdown
Member

seisman commented Apr 2, 2026

Ping @michaelgrund

seisman and others added 4 commits April 6, 2026 20:54
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Comment thread examples/gallery/embellishments/map_roses.py Outdated
Comment thread examples/gallery/embellishments/map_roses.py
Comment thread examples/gallery/embellishments/map_roses.py Outdated
Comment thread examples/gallery/embellishments/map_roses.py
Comment thread examples/gallery/embellishments/map_roses.py Outdated
@michaelgrund
Copy link
Copy Markdown
Member Author

/format

@seisman
Copy link
Copy Markdown
Member

seisman commented Apr 10, 2026

Please rewrap the short lines to 88 characters, then I think this PR should be good for merging.

Copy link
Copy Markdown
Member

@yvonnefroehlich yvonnefroehlich left a comment

Choose a reason for hiding this comment

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

Looks good (just the line length 🙃).

@seisman seisman removed the needs review This PR has higher priority and needs review. label Apr 10, 2026
@seisman seisman merged commit b903735 into main Apr 10, 2026
7 of 8 checks passed
@seisman seisman deleted the gallery-map-roses branch April 10, 2026 09:20
@seisman seisman changed the title DOC: Add gallery example to show usage of map roses DOC: Add gallery example for directional roses Apr 27, 2026
@seisman seisman changed the title DOC: Add gallery example for directional roses Add gallery example for directional roses Apr 27, 2026
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.

4 participants