-
Notifications
You must be signed in to change notification settings - Fork 235
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
base: main
Are you sure you want to change the base?
Conversation
|
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 |
Co-authored-by: Yvonne Fröhlich <[email protected]>
|
Instead of plotting eight roses in eight subplots, maybe it's better to plot eight roses in a single basemap? |
Co-authored-by: Yvonne Fröhlich <[email protected]>
Co-authored-by: Yvonne Fröhlich <[email protected]>
Co-authored-by: Yvonne Fröhlich <[email protected]>
|
@michaelgrund @yvonnefroehlich I've opened PR #4025 which adds the |
Great, will wait until #4025 is merged! |
|
@michaelgrund The |
Co-authored-by: Yvonne Fröhlich <[email protected]>
|
/format |
|
/format |
yvonnefroehlich
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall the comments can be rewrapped to use the maximum line length.
| region = [-5, 80, -10, 32] | ||
| projection = "M10c" | ||
|
|
||
| yval_top = 20 | ||
| yval_bottom = 0 | ||
| width = "1.5c" | ||
|
|
||
| fig.basemap(region=region, projection=projection, frame=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As now the roses are plotted into one map, variables for region and projection are not directly needed.
| region = [-5, 80, -10, 32] | |
| projection = "M10c" | |
| yval_top = 20 | |
| yval_bottom = 0 | |
| width = "1.5c" | |
| fig.basemap(region=region, projection=projection, frame=True) | |
| yval_top = 20 | |
| yval_bottom = 0 | |
| width = "1.5c" | |
| fig.basemap(region=[-5, 80, -10, 32], projection="M10c", frame=True) |
| # Fancy, 1.5 cm wide rose of level 1 and labels indicating the different | ||
| # directions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this should fit into one line.
| # Fancy, 1.5 cm wide rose of level 1 and labels indicating the different | |
| # directions | |
| # Fancy, 1.5 cm wide rose of level 1 and labels indicating the different directions |
| yval_top = 20 | ||
| yval_bottom = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the variable names are easier to read without the "val" (and they are shorter).
| yval_top = 20 | |
| yval_bottom = 0 | |
| y_top = 20 | |
| y_bottom = 0 |
| fig.directional_rose( | ||
| width=width, | ||
| labels=True, | ||
| position=Position((20, yval_top), cstype="mapcoords"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| position=Position((20, yval_top), cstype="mapcoords"), | |
| position=Position((20, y_top), cstype="mapcoords"), |
| fig.directional_rose( | ||
| width=width, | ||
| labels=True, | ||
| position=Position((45, yval_top), cstype="mapcoords"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| position=Position((45, yval_top), cstype="mapcoords"), | |
| position=Position((45, y_top), cstype="mapcoords"), |
| fig.directional_rose( | ||
| width=width, | ||
| labels=["", "", "", "N"], | ||
| position=Position((20, yval_bottom), cstype="mapcoords"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| position=Position((20, yval_bottom), cstype="mapcoords"), | |
| position=Position((20, y_bottom), cstype="mapcoords"), |
| fig.directional_rose( | ||
| width=width, | ||
| labels=["W", "E", "", ""], | ||
| position=Position((45, yval_bottom), cstype="mapcoords"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| position=Position((45, yval_bottom), cstype="mapcoords"), | |
| position=Position((45, y_bottom), cstype="mapcoords"), |
| fig.directional_rose( | ||
| width=width, | ||
| labels=["", "", "South", "North"], | ||
| position=Position((70, yval_bottom), cstype="mapcoords"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| position=Position((70, yval_bottom), cstype="mapcoords"), | |
| position=Position((70, y_bottom), cstype="mapcoords"), |
| # Plain rose of 1.5 cm width showing arrow towards north, a cross | ||
| # indicating the cardinal directions, and corresponding label |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # Plain rose of 1.5 cm width showing arrow towards north, a cross | |
| # indicating the cardinal directions, and corresponding label | |
| # Plain rose of 1.5 cm width showing an arrow towards North, a cross | |
| # indicating the cardinal directions, and a label for the North direction |
| # Plain rose of 1.5 cm width showing arrow towards north, a cross | ||
| # indicating the cardinal directions, and corresponding label. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # Plain rose of 1.5 cm width showing arrow towards north, a cross | |
| # indicating the cardinal directions, and corresponding label. | |
| # Plain rose of 1.5 cm width showing an arrow towards North, a cross | |
| # indicating the cardinal directions, and a label for the North direction. |
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
make formatandmake checkto make sure the code follows the style guide.doc/api/index.rst.Slash Commands
You can write slash commands (
/command) in the first line of a comment to performspecific operations. Supported slash command is:
/format: automatically format and lint the code