From 2ea20618ee3edae0718a5b39ea2843974739b608 Mon Sep 17 00:00:00 2001 From: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Date: Wed, 23 Jul 2025 17:00:44 +0200 Subject: [PATCH 01/19] DOC: Add gallery example to usage of map roses --- examples/gallery/embellishments/map_roses.py | 148 +++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 examples/gallery/embellishments/map_roses.py diff --git a/examples/gallery/embellishments/map_roses.py b/examples/gallery/embellishments/map_roses.py new file mode 100644 index 00000000000..0c457da1c15 --- /dev/null +++ b/examples/gallery/embellishments/map_roses.py @@ -0,0 +1,148 @@ +r""" +Directional map roses +========= + +The ``rose`` parameter of the :meth:`pygmt.Figure.basemap` and +: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 + of the reference point. Choose from + + - **g**: Give map coordinates as *longitude*\/\ *latitude*. + - **j**\|\ **J**: Specify a two-character (order independent) code. + Choose from vertical **T**\(op), **M**\(iddle), or **B**\(ottom) and + horizontal **L**\(eft), **C**\(entre), or **R**\(ight). Lower / + uppercase **j** / **J** mean inside / outside of the map bounding + box. + - **n**: Give normalized bounding box coordinates as *nx*\/\ *ny*. + - **x**: Give plot coordinates as *x*\/\ *y*. + +- 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 + 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]. + +- justify: **+j**: Set the anchor point. Specify a two-character (order + 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, + append your own four comma-separated strings to override the default. + Skip a specific label by leaving it blank. + +- offset: **+o**\ *offset* or **+o**\ *xoffset*/\ *yoffset*: Give either a + common shift or individual shifts in x- (longitude) and y- (latitude) + directions. + +Colors of the map roses can be adjusted using :gmt-term:`MAP_DEFAULT_PEN` +and :gmt-term:`MAP_TICK_PEN_PRIMARY` via :func:`pygmt.config`. Customizing +label font and color can be done via :gmt-term:`FONT_TITLE`. +""" + +fig = pygmt.Figure() + +region = [-5,5,-5,5] +projection = "M?" + +with fig.subplot( + nrows=2, ncols=4, figsize=("20c", "10c"), sharex = True, sharey = True): + + # Plain rose of 2.5 cm width showing arrow towards north, a cross + # indicating the cardinal directions, and corresponding label + with fig.set_panel(panel=0): + fig.basemap(region = region, + projection = projection, + rose = "g0/0+w2.5c+jCM+l", + frame = True) + + # Fancy, 2.5 cm wide rose of level 1 and labels indicating the different + # directions + with fig.set_panel(panel=1): + + fig.basemap(region = region, + projection = projection, + rose = "g0/0+w2.5c+f1+jCM+l", + frame = True) + + # Fancy, 2.5 cm wide rose of level 2 abels indicating the different + # directions + with fig.set_panel(panel=2): + + fig.basemap(region = region, + projection = projection, + rose = "g0/0+w2.5c+f2+l+jCM", + frame = True) + + # Fancy, 2.5 cm wide rose of level 3 abels indicating the different + # directions + with fig.set_panel(panel=3): + + fig.basemap(region = region, + projection = projection, + rose = "g0/0+w2.5c+f3+l+jCM", + frame = True) + + + # Plain rose of 2.5 cm width showing arrow towards north, a cross + # indicating the cardinal directions, and corresponding label. + # Colors of the rose and labels are defined via + # MAP_TICK_PEN_PRIMARY and FONT_TITLE, respectively + with fig.set_panel(panel=4): + + with pygmt.config(MAP_TICK_PEN_PRIMARY="purple", + FONT_TITLE="8p,darkmagenta"): + + + fig.basemap(region = region, + projection = projection, + rose = "g0/0+w2.5c+jCM+l", + frame = True) + + # Fancy, 2.5 cm wide rose of level 1 with only one label indicating the North + # direction. Colors of the rose and labels are defined via + # MAP_DEFAULT_PEN, MAP_TICK_PEN_PRIMARY and FONT_TITLE, respectively. + with fig.set_panel(panel=5): + + with pygmt.config(MAP_DEFAULT_PEN="default,pink", + MAP_TICK_PEN_PRIMARY="thick,red3", + FONT_TITLE="8p,Bookman-Light,red3"): + + fig.basemap(region = region, + projection = projection, + rose = "g0/0+w2.5c+f1+jCM+l,,,N", + frame = True) + + # Fancy, 2.5 cm wide rose of level 2 with two labels indicating the West and + # East directions. Colors of the rose and labels are defined via + # MAP_DEFAULT_PEN, MAP_TICK_PEN_PRIMARY and FONT_TITLE, respectively + with fig.set_panel(panel=6): + + with pygmt.config(MAP_DEFAULT_PEN="default,lightorange", + MAP_TICK_PEN_PRIMARY="thick,darkorange", + FONT_TITLE="8p,Bookman-Light,darkorange"): + + fig.basemap(region = region, + projection = projection, + rose = "g0/0+w2.5c+f2+jCM+lW,E,,", + frame = True) + + # Fancy, 2.5 cm wide rose of level 3 with two labels indicating the North and + # South directions. Colors of the rose and labels are defined via + # MAP_DEFAULT_PEN, MAP_TICK_PEN_PRIMARY and FONT_TITLE, respectively + with fig.set_panel(panel=7): + + with pygmt.config(MAP_DEFAULT_PEN="default,Dodgerblue4", + MAP_TICK_PEN_PRIMARY="thick,Dodgerblue", + FONT_TITLE="8p,AvantGarde-Demi,Dodgerblue4"): + + fig.basemap(region = region, + projection = projection, + rose = "g0/0+w2.5c+f3+l,,South,North+jCM", + frame = True) + +fig.show() From 929b66919e2e571976eed1685e99c3a7b4fad565 Mon Sep 17 00:00:00 2001 From: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Date: Wed, 23 Jul 2025 17:23:29 +0200 Subject: [PATCH 02/19] rm tws --- examples/gallery/embellishments/map_roses.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/gallery/embellishments/map_roses.py b/examples/gallery/embellishments/map_roses.py index 0c457da1c15..6ac0f0380cf 100644 --- a/examples/gallery/embellishments/map_roses.py +++ b/examples/gallery/embellishments/map_roses.py @@ -129,7 +129,7 @@ fig.basemap(region = region, projection = projection, rose = "g0/0+w2.5c+f2+jCM+lW,E,,", - frame = True) + frame = True) # Fancy, 2.5 cm wide rose of level 3 with two labels indicating the North and # South directions. Colors of the rose and labels are defined via @@ -143,6 +143,6 @@ fig.basemap(region = region, projection = projection, rose = "g0/0+w2.5c+f3+l,,South,North+jCM", - frame = True) + frame = True) fig.show() From 5dac68f46bae1369281e620aef953c6181e244f8 Mon Sep 17 00:00:00 2001 From: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Date: Thu, 24 Jul 2025 08:31:23 +0200 Subject: [PATCH 03/19] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com> --- examples/gallery/embellishments/map_roses.py | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/gallery/embellishments/map_roses.py b/examples/gallery/embellishments/map_roses.py index 6ac0f0380cf..99d6e52ff53 100644 --- a/examples/gallery/embellishments/map_roses.py +++ b/examples/gallery/embellishments/map_roses.py @@ -43,6 +43,7 @@ and :gmt-term:`MAP_TICK_PEN_PRIMARY` via :func:`pygmt.config`. Customizing label font and color can be done via :gmt-term:`FONT_TITLE`. """ +import pygmt fig = pygmt.Figure() From d1f7d9e98643ad4cbdf685477d046c86f1230afa Mon Sep 17 00:00:00 2001 From: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Date: Mon, 28 Jul 2025 11:40:25 +0200 Subject: [PATCH 04/19] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com> --- examples/gallery/embellishments/map_roses.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/gallery/embellishments/map_roses.py b/examples/gallery/embellishments/map_roses.py index 99d6e52ff53..fa7a0ff6513 100644 --- a/examples/gallery/embellishments/map_roses.py +++ b/examples/gallery/embellishments/map_roses.py @@ -21,7 +21,7 @@ - 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 +- 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 From b682ff67d24b1480c4e09fdeb3ea2d92467d01b4 Mon Sep 17 00:00:00 2001 From: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Date: Mon, 28 Jul 2025 11:40:42 +0200 Subject: [PATCH 05/19] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com> --- examples/gallery/embellishments/map_roses.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/gallery/embellishments/map_roses.py b/examples/gallery/embellishments/map_roses.py index fa7a0ff6513..750df95238c 100644 --- a/examples/gallery/embellishments/map_roses.py +++ b/examples/gallery/embellishments/map_roses.py @@ -24,14 +24,14 @@ - 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]. + the four minor orientations WNW-ESE, NNW-SSE, NNE-SSW, and ENE-WSW + [Default is 1]. - justify: **+j**: Set the anchor point. Specify a two-character (order 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, +- 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. Skip a specific label by leaving it blank. From 0776071a7f2d3088f629a59d39133e4a36cc3bac Mon Sep 17 00:00:00 2001 From: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Date: Mon, 28 Jul 2025 11:42:02 +0200 Subject: [PATCH 06/19] Apply suggestions from code review --- examples/gallery/embellishments/map_roses.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/gallery/embellishments/map_roses.py b/examples/gallery/embellishments/map_roses.py index 750df95238c..5f6bbf60a23 100644 --- a/examples/gallery/embellishments/map_roses.py +++ b/examples/gallery/embellishments/map_roses.py @@ -21,7 +21,7 @@ - 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 +- 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 four minor orientations WNW-ESE, NNW-SSE, NNE-SSW, and ENE-WSW From c23f5c63b875b1793e71cea3766b83a4cbc307a4 Mon Sep 17 00:00:00 2001 From: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Date: Mon, 28 Jul 2025 16:26:44 +0200 Subject: [PATCH 07/19] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com> --- examples/gallery/embellishments/map_roses.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/gallery/embellishments/map_roses.py b/examples/gallery/embellishments/map_roses.py index 5f6bbf60a23..a98bd1c9eed 100644 --- a/examples/gallery/embellishments/map_roses.py +++ b/examples/gallery/embellishments/map_roses.py @@ -18,24 +18,24 @@ - **n**: Give normalized bounding box coordinates as *nx*\/\ *ny*. - **x**: Give plot coordinates as *x*\/\ *y*. -- width: **+w**: Set the width of the rose in plot coordinates (append +- 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 +- 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 four minor orientations WNW-ESE, NNW-SSE, NNE-SSW, and ENE-WSW [Default is 1]. -- justify: **+j**: Set the anchor point. Specify a two-character (order +- justify: **+j**. Set the anchor point. Specify a two-character (order 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, +- 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. Skip a specific label by leaving it blank. -- offset: **+o**\ *offset* or **+o**\ *xoffset*/\ *yoffset*: Give either a +- offset: **+o**\ *offset* or **+o**\ *xoffset*/\ *yoffset*. Give either a common shift or individual shifts in x- (longitude) and y- (latitude) directions. From 20e592658bf5c799aa18c4f20ec36a30786de0e8 Mon Sep 17 00:00:00 2001 From: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Date: Wed, 28 Jan 2026 09:51:42 +0100 Subject: [PATCH 08/19] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com> --- examples/gallery/embellishments/map_roses.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/gallery/embellishments/map_roses.py b/examples/gallery/embellishments/map_roses.py index a98bd1c9eed..1491a18979f 100644 --- a/examples/gallery/embellishments/map_roses.py +++ b/examples/gallery/embellishments/map_roses.py @@ -1,12 +1,12 @@ r""" Directional map roses -========= +===================== The ``rose`` parameter of the :meth:`pygmt.Figure.basemap` and :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 +- position: **g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**. Set the position of the reference point. Choose from - **g**: Give map coordinates as *longitude*\/\ *latitude*. @@ -70,7 +70,7 @@ rose = "g0/0+w2.5c+f1+jCM+l", frame = True) - # Fancy, 2.5 cm wide rose of level 2 abels indicating the different + # Fancy, 2.5 cm wide rose of level 2 and labels indicating the different # directions with fig.set_panel(panel=2): @@ -79,7 +79,7 @@ rose = "g0/0+w2.5c+f2+l+jCM", frame = True) - # Fancy, 2.5 cm wide rose of level 3 abels indicating the different + # Fancy, 2.5 cm wide rose of level 3 and labels indicating the different # directions with fig.set_panel(panel=3): From edc3e43c08baa0cfc356819c99b2770aeffd626d Mon Sep 17 00:00:00 2001 From: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Date: Wed, 28 Jan 2026 10:39:38 +0100 Subject: [PATCH 09/19] Use new Figure.directional_rose method --- examples/gallery/embellishments/map_roses.py | 221 ++++++++----------- 1 file changed, 90 insertions(+), 131 deletions(-) diff --git a/examples/gallery/embellishments/map_roses.py b/examples/gallery/embellishments/map_roses.py index 1491a18979f..c2801a6339d 100644 --- a/examples/gallery/embellishments/map_roses.py +++ b/examples/gallery/embellishments/map_roses.py @@ -2,148 +2,107 @@ Directional map roses ===================== -The ``rose`` parameter of the :meth:`pygmt.Figure.basemap` and -: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 - of the reference point. Choose from - - - **g**: Give map coordinates as *longitude*\/\ *latitude*. - - **j**\|\ **J**: Specify a two-character (order independent) code. - Choose from vertical **T**\(op), **M**\(iddle), or **B**\(ottom) and - horizontal **L**\(eft), **C**\(entre), or **R**\(ight). Lower / - uppercase **j** / **J** mean inside / outside of the map bounding - box. - - **n**: Give normalized bounding box coordinates as *nx*\/\ *ny*. - - **x**: Give plot coordinates as *x*\/\ *y*. - -- 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 - 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 four minor orientations WNW-ESE, NNW-SSE, NNE-SSW, and ENE-WSW - [Default is 1]. - -- justify: **+j**. Set the anchor point. Specify a two-character (order - 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, - append your own four comma-separated strings to override the default. - Skip a specific label by leaving it blank. - -- offset: **+o**\ *offset* or **+o**\ *xoffset*/\ *yoffset*. Give either a - common shift or individual shifts in x- (longitude) and y- (latitude) - directions. +The `:meth:`pygmt.Figure.directional_rose` method allows to add +directional roses on maps when using :meth:`pygmt.Figure.basemap` +or :meth:`pygmt.Figure.coast`. This example shows how such a map +rose can be customized. Colors of the map roses can be adjusted using :gmt-term:`MAP_DEFAULT_PEN` and :gmt-term:`MAP_TICK_PEN_PRIMARY` via :func:`pygmt.config`. Customizing label font and color can be done via :gmt-term:`FONT_TITLE`. """ + + import pygmt +from pygmt.params import Position fig = pygmt.Figure() -region = [-5,5,-5,5] -projection = "M?" - -with fig.subplot( - nrows=2, ncols=4, figsize=("20c", "10c"), sharex = True, sharey = True): - - # Plain rose of 2.5 cm width showing arrow towards north, a cross - # indicating the cardinal directions, and corresponding label - with fig.set_panel(panel=0): - fig.basemap(region = region, - projection = projection, - rose = "g0/0+w2.5c+jCM+l", - frame = True) - - # Fancy, 2.5 cm wide rose of level 1 and labels indicating the different - # directions - with fig.set_panel(panel=1): - - fig.basemap(region = region, - projection = projection, - rose = "g0/0+w2.5c+f1+jCM+l", - frame = True) - - # Fancy, 2.5 cm wide rose of level 2 and labels indicating the different - # directions - with fig.set_panel(panel=2): - - fig.basemap(region = region, - projection = projection, - rose = "g0/0+w2.5c+f2+l+jCM", - frame = True) - - # Fancy, 2.5 cm wide rose of level 3 and labels indicating the different - # directions - with fig.set_panel(panel=3): - - fig.basemap(region = region, - projection = projection, - rose = "g0/0+w2.5c+f3+l+jCM", - frame = True) - - - # Plain rose of 2.5 cm width showing arrow towards north, a cross - # indicating the cardinal directions, and corresponding label. - # Colors of the rose and labels are defined via - # MAP_TICK_PEN_PRIMARY and FONT_TITLE, respectively - with fig.set_panel(panel=4): - - with pygmt.config(MAP_TICK_PEN_PRIMARY="purple", - FONT_TITLE="8p,darkmagenta"): - - - fig.basemap(region = region, - projection = projection, - rose = "g0/0+w2.5c+jCM+l", - frame = True) - - # Fancy, 2.5 cm wide rose of level 1 with only one label indicating the North - # direction. Colors of the rose and labels are defined via - # MAP_DEFAULT_PEN, MAP_TICK_PEN_PRIMARY and FONT_TITLE, respectively. - with fig.set_panel(panel=5): - - with pygmt.config(MAP_DEFAULT_PEN="default,pink", - MAP_TICK_PEN_PRIMARY="thick,red3", +region = [-5,80,-10,32] +projection = "M10c" + +yval_top = 20 +yval_bottom = 0 +width = "1.5c" + +fig.basemap(region = region, + projection = projection, + frame = True) + +# Plain rose of 1.5 cm width showing arrow towards north, a cross +# indicating the cardinal directions, and corresponding label +fig.directional_rose(width=width, + labels = True, + position=Position((0, yval_top), cstype="mapcoords") + ) + +# Fancy, 1.5 cm wide rose of level 1 and labels indicating the different +# directions +fig.directional_rose(width=width, + labels = True, + position=Position((20, yval_top), cstype="mapcoords"), + fancy = True) + +# Fancy, 1.5 cm wide rose of level 2 and labels indicating the different +# directions +fig.directional_rose(width=width, + labels = True, + position=Position((45, yval_top), cstype="mapcoords"), + fancy = 2) + +# Fancy, 1.5 cm wide rose of level 3 and labels indicating the different +# directions +fig.directional_rose(width=width, + labels = True, + position=Position((70, yval_top), cstype="mapcoords"), + fancy = 3) + + + +# Plain rose of 1.5 cm width showing arrow towards north, a cross +# indicating the cardinal directions, and corresponding label. +# Colors of the rose and labels are defined via +# MAP_TICK_PEN_PRIMARY and FONT_TITLE, respectively +with pygmt.config(MAP_TICK_PEN_PRIMARY="purple", + FONT_TITLE="8p,darkmagenta"): + fig.directional_rose(width=width, + labels = True, + position=Position((0, yval_bottom), cstype="mapcoords") + ) + +# Fancy, 1.5 cm wide rose of level 1 with only one label indicating the North +# direction. Colors of the rose and labels are defined via +# MAP_DEFAULT_PEN, MAP_TICK_PEN_PRIMARY and FONT_TITLE, respectively. +with pygmt.config(MAP_DEFAULT_PEN="default,pink", + MAP_TICK_PEN_PRIMARY="red3", FONT_TITLE="8p,Bookman-Light,red3"): - - fig.basemap(region = region, - projection = projection, - rose = "g0/0+w2.5c+f1+jCM+l,,,N", - frame = True) - - # Fancy, 2.5 cm wide rose of level 2 with two labels indicating the West and - # East directions. Colors of the rose and labels are defined via - # MAP_DEFAULT_PEN, MAP_TICK_PEN_PRIMARY and FONT_TITLE, respectively - with fig.set_panel(panel=6): - - with pygmt.config(MAP_DEFAULT_PEN="default,lightorange", - MAP_TICK_PEN_PRIMARY="thick,darkorange", + fig.directional_rose(width=width, + labels = ["", "", "", "N"], + position=Position((20, yval_bottom), cstype="mapcoords"), + fancy=True + ) + +# Fancy, 1.5 cm wide rose of level 2 with two labels indicating the West and +# East directions. Colors of the rose and labels are defined via +# MAP_DEFAULT_PEN, MAP_TICK_PEN_PRIMARY and FONT_TITLE, respectively +with pygmt.config(MAP_DEFAULT_PEN="default,lightorange", + MAP_TICK_PEN_PRIMARY="darkorange", FONT_TITLE="8p,Bookman-Light,darkorange"): - - fig.basemap(region = region, - projection = projection, - rose = "g0/0+w2.5c+f2+jCM+lW,E,,", - frame = True) - - # Fancy, 2.5 cm wide rose of level 3 with two labels indicating the North and - # South directions. Colors of the rose and labels are defined via - # MAP_DEFAULT_PEN, MAP_TICK_PEN_PRIMARY and FONT_TITLE, respectively - with fig.set_panel(panel=7): - - with pygmt.config(MAP_DEFAULT_PEN="default,Dodgerblue4", - MAP_TICK_PEN_PRIMARY="thick,Dodgerblue", + fig.directional_rose(width=width, + labels = ["W", "E", "", ""], + position=Position((45, yval_bottom), cstype="mapcoords"), + fancy=2 + ) +# Fancy, 1.5 cm wide rose of level 3 with two labels indicating the North and +# South directions. Colors of the rose and labels are defined via +# MAP_DEFAULT_PEN, MAP_TICK_PEN_PRIMARY and FONT_TITLE, respectively +with pygmt.config(MAP_DEFAULT_PEN="default,Dodgerblue4", + MAP_TICK_PEN_PRIMARY="Dodgerblue", FONT_TITLE="8p,AvantGarde-Demi,Dodgerblue4"): - - fig.basemap(region = region, - projection = projection, - rose = "g0/0+w2.5c+f3+l,,South,North+jCM", - frame = True) + fig.directional_rose(width=width, + labels = ["", "", "South", "North"], + position=Position((70, yval_bottom), cstype="mapcoords"), + fancy=3 + ) fig.show() From 3605a62b850902649d3369da0fafd6f4498c10c0 Mon Sep 17 00:00:00 2001 From: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Date: Wed, 28 Jan 2026 10:41:48 +0100 Subject: [PATCH 10/19] Update map_roses.py --- examples/gallery/embellishments/map_roses.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/gallery/embellishments/map_roses.py b/examples/gallery/embellishments/map_roses.py index c2801a6339d..afe84d558c6 100644 --- a/examples/gallery/embellishments/map_roses.py +++ b/examples/gallery/embellishments/map_roses.py @@ -3,8 +3,8 @@ ===================== The `:meth:`pygmt.Figure.directional_rose` method allows to add -directional roses on maps when using :meth:`pygmt.Figure.basemap` -or :meth:`pygmt.Figure.coast`. This example shows how such a map +directional roses on maps when using :meth:`pygmt.Figure.basemap` +or :meth:`pygmt.Figure.coast`. This example shows how such a map rose can be customized. Colors of the map roses can be adjusted using :gmt-term:`MAP_DEFAULT_PEN` From 2eced7ab5acedc5144570b557bb0390ca7bc2a99 Mon Sep 17 00:00:00 2001 From: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Date: Wed, 28 Jan 2026 10:43:43 +0100 Subject: [PATCH 11/19] Update map_roses.py --- examples/gallery/embellishments/map_roses.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/gallery/embellishments/map_roses.py b/examples/gallery/embellishments/map_roses.py index afe84d558c6..05d5c054f00 100644 --- a/examples/gallery/embellishments/map_roses.py +++ b/examples/gallery/embellishments/map_roses.py @@ -57,8 +57,6 @@ position=Position((70, yval_top), cstype="mapcoords"), fancy = 3) - - # Plain rose of 1.5 cm width showing arrow towards north, a cross # indicating the cardinal directions, and corresponding label. # Colors of the rose and labels are defined via @@ -80,7 +78,7 @@ labels = ["", "", "", "N"], position=Position((20, yval_bottom), cstype="mapcoords"), fancy=True - ) + ) # Fancy, 1.5 cm wide rose of level 2 with two labels indicating the West and # East directions. Colors of the rose and labels are defined via @@ -92,7 +90,8 @@ labels = ["W", "E", "", ""], position=Position((45, yval_bottom), cstype="mapcoords"), fancy=2 - ) + ) + # Fancy, 1.5 cm wide rose of level 3 with two labels indicating the North and # South directions. Colors of the rose and labels are defined via # MAP_DEFAULT_PEN, MAP_TICK_PEN_PRIMARY and FONT_TITLE, respectively @@ -103,6 +102,6 @@ labels = ["", "", "South", "North"], position=Position((70, yval_bottom), cstype="mapcoords"), fancy=3 - ) + ) fig.show() From 8cecbf17fc9db987563ddba3d58d3c52c49bba9b Mon Sep 17 00:00:00 2001 From: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Date: Wed, 28 Jan 2026 10:45:00 +0100 Subject: [PATCH 12/19] Update map_roses.py --- examples/gallery/embellishments/map_roses.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/gallery/embellishments/map_roses.py b/examples/gallery/embellishments/map_roses.py index 05d5c054f00..1f14797471d 100644 --- a/examples/gallery/embellishments/map_roses.py +++ b/examples/gallery/embellishments/map_roses.py @@ -96,7 +96,7 @@ # South directions. Colors of the rose and labels are defined via # MAP_DEFAULT_PEN, MAP_TICK_PEN_PRIMARY and FONT_TITLE, respectively with pygmt.config(MAP_DEFAULT_PEN="default,Dodgerblue4", - MAP_TICK_PEN_PRIMARY="Dodgerblue", + MAP_TICK_PEN_PRIMARY="Dodgerblue", FONT_TITLE="8p,AvantGarde-Demi,Dodgerblue4"): fig.directional_rose(width=width, labels = ["", "", "South", "North"], From 7c00cf9d2699c289fe90cf55996af40b480a222a Mon Sep 17 00:00:00 2001 From: actions-bot <58130806+actions-bot@users.noreply.github.com> Date: Wed, 28 Jan 2026 09:46:14 +0000 Subject: [PATCH 13/19] [format-command] fixes --- examples/gallery/embellishments/map_roses.py | 113 ++++++++++--------- 1 file changed, 62 insertions(+), 51 deletions(-) diff --git a/examples/gallery/embellishments/map_roses.py b/examples/gallery/embellishments/map_roses.py index 1f14797471d..5db8fd8c310 100644 --- a/examples/gallery/embellishments/map_roses.py +++ b/examples/gallery/embellishments/map_roses.py @@ -12,96 +12,107 @@ label font and color can be done via :gmt-term:`FONT_TITLE`. """ - import pygmt from pygmt.params import Position fig = pygmt.Figure() -region = [-5,80,-10,32] +region = [-5, 80, -10, 32] projection = "M10c" yval_top = 20 yval_bottom = 0 width = "1.5c" -fig.basemap(region = region, - projection = projection, - frame = True) +fig.basemap(region=region, projection=projection, frame=True) # Plain rose of 1.5 cm width showing arrow towards north, a cross # indicating the cardinal directions, and corresponding label -fig.directional_rose(width=width, - labels = True, - position=Position((0, yval_top), cstype="mapcoords") - ) +fig.directional_rose( + width=width, labels=True, position=Position((0, yval_top), cstype="mapcoords") +) # Fancy, 1.5 cm wide rose of level 1 and labels indicating the different # directions -fig.directional_rose(width=width, - labels = True, - position=Position((20, yval_top), cstype="mapcoords"), - fancy = True) +fig.directional_rose( + width=width, + labels=True, + position=Position((20, yval_top), cstype="mapcoords"), + fancy=True, +) # Fancy, 1.5 cm wide rose of level 2 and labels indicating the different # directions -fig.directional_rose(width=width, - labels = True, - position=Position((45, yval_top), cstype="mapcoords"), - fancy = 2) +fig.directional_rose( + width=width, + labels=True, + position=Position((45, yval_top), cstype="mapcoords"), + fancy=2, +) # Fancy, 1.5 cm wide rose of level 3 and labels indicating the different # directions -fig.directional_rose(width=width, - labels = True, - position=Position((70, yval_top), cstype="mapcoords"), - fancy = 3) +fig.directional_rose( + width=width, + labels=True, + position=Position((70, yval_top), cstype="mapcoords"), + fancy=3, +) # Plain rose of 1.5 cm width showing arrow towards north, a cross # indicating the cardinal directions, and corresponding label. # Colors of the rose and labels are defined via # MAP_TICK_PEN_PRIMARY and FONT_TITLE, respectively -with pygmt.config(MAP_TICK_PEN_PRIMARY="purple", - FONT_TITLE="8p,darkmagenta"): - fig.directional_rose(width=width, - labels = True, - position=Position((0, yval_bottom), cstype="mapcoords") - ) +with pygmt.config(MAP_TICK_PEN_PRIMARY="purple", FONT_TITLE="8p,darkmagenta"): + fig.directional_rose( + width=width, + labels=True, + position=Position((0, yval_bottom), cstype="mapcoords"), + ) # Fancy, 1.5 cm wide rose of level 1 with only one label indicating the North # direction. Colors of the rose and labels are defined via # MAP_DEFAULT_PEN, MAP_TICK_PEN_PRIMARY and FONT_TITLE, respectively. -with pygmt.config(MAP_DEFAULT_PEN="default,pink", - MAP_TICK_PEN_PRIMARY="red3", - FONT_TITLE="8p,Bookman-Light,red3"): - fig.directional_rose(width=width, - labels = ["", "", "", "N"], - position=Position((20, yval_bottom), cstype="mapcoords"), - fancy=True - ) +with pygmt.config( + MAP_DEFAULT_PEN="default,pink", + MAP_TICK_PEN_PRIMARY="red3", + FONT_TITLE="8p,Bookman-Light,red3", +): + fig.directional_rose( + width=width, + labels=["", "", "", "N"], + position=Position((20, yval_bottom), cstype="mapcoords"), + fancy=True, + ) # Fancy, 1.5 cm wide rose of level 2 with two labels indicating the West and # East directions. Colors of the rose and labels are defined via # MAP_DEFAULT_PEN, MAP_TICK_PEN_PRIMARY and FONT_TITLE, respectively -with pygmt.config(MAP_DEFAULT_PEN="default,lightorange", - MAP_TICK_PEN_PRIMARY="darkorange", - FONT_TITLE="8p,Bookman-Light,darkorange"): - fig.directional_rose(width=width, - labels = ["W", "E", "", ""], - position=Position((45, yval_bottom), cstype="mapcoords"), - fancy=2 - ) +with pygmt.config( + MAP_DEFAULT_PEN="default,lightorange", + MAP_TICK_PEN_PRIMARY="darkorange", + FONT_TITLE="8p,Bookman-Light,darkorange", +): + fig.directional_rose( + width=width, + labels=["W", "E", "", ""], + position=Position((45, yval_bottom), cstype="mapcoords"), + fancy=2, + ) # Fancy, 1.5 cm wide rose of level 3 with two labels indicating the North and # South directions. Colors of the rose and labels are defined via # MAP_DEFAULT_PEN, MAP_TICK_PEN_PRIMARY and FONT_TITLE, respectively -with pygmt.config(MAP_DEFAULT_PEN="default,Dodgerblue4", - MAP_TICK_PEN_PRIMARY="Dodgerblue", - FONT_TITLE="8p,AvantGarde-Demi,Dodgerblue4"): - fig.directional_rose(width=width, - labels = ["", "", "South", "North"], - position=Position((70, yval_bottom), cstype="mapcoords"), - fancy=3 - ) +with pygmt.config( + MAP_DEFAULT_PEN="default,Dodgerblue4", + MAP_TICK_PEN_PRIMARY="Dodgerblue", + FONT_TITLE="8p,AvantGarde-Demi,Dodgerblue4", +): + fig.directional_rose( + width=width, + labels=["", "", "South", "North"], + position=Position((70, yval_bottom), cstype="mapcoords"), + fancy=3, + ) fig.show() From 6b17430f7961793c2096ca8f57129bc6312bd8aa Mon Sep 17 00:00:00 2001 From: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Date: Wed, 28 Jan 2026 10:48:45 +0100 Subject: [PATCH 14/19] Update map_roses.py --- examples/gallery/embellishments/map_roses.py | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/gallery/embellishments/map_roses.py b/examples/gallery/embellishments/map_roses.py index 5db8fd8c310..3a89643fe29 100644 --- a/examples/gallery/embellishments/map_roses.py +++ b/examples/gallery/embellishments/map_roses.py @@ -12,6 +12,7 @@ label font and color can be done via :gmt-term:`FONT_TITLE`. """ +# %% import pygmt from pygmt.params import Position From ef363b83b24290fe2b1017f0b7039c628bd539da Mon Sep 17 00:00:00 2001 From: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Date: Wed, 28 Jan 2026 11:58:37 +0100 Subject: [PATCH 15/19] Update map_roses.py --- examples/gallery/embellishments/map_roses.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/gallery/embellishments/map_roses.py b/examples/gallery/embellishments/map_roses.py index 3a89643fe29..dc1eccdd5ac 100644 --- a/examples/gallery/embellishments/map_roses.py +++ b/examples/gallery/embellishments/map_roses.py @@ -2,7 +2,7 @@ Directional map roses ===================== -The `:meth:`pygmt.Figure.directional_rose` method allows to add +The :meth:`pygmt.Figure.directional_rose` method allows to add directional roses on maps when using :meth:`pygmt.Figure.basemap` or :meth:`pygmt.Figure.coast`. This example shows how such a map rose can be customized. From 5fd2e4c6209bd22c37defcb6cc09115ff015fdf4 Mon Sep 17 00:00:00 2001 From: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Date: Thu, 29 Jan 2026 06:52:40 +0100 Subject: [PATCH 16/19] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com> --- examples/gallery/embellishments/map_roses.py | 29 ++++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/examples/gallery/embellishments/map_roses.py b/examples/gallery/embellishments/map_roses.py index dc1eccdd5ac..229c65d0254 100644 --- a/examples/gallery/embellishments/map_roses.py +++ b/examples/gallery/embellishments/map_roses.py @@ -21,24 +21,23 @@ region = [-5, 80, -10, 32] projection = "M10c" -yval_top = 20 -yval_bottom = 0 +y_top = 20 +y_bottom = 0 width = "1.5c" fig.basemap(region=region, projection=projection, frame=True) -# 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 fig.directional_rose( width=width, labels=True, position=Position((0, yval_top), cstype="mapcoords") ) -# 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 fig.directional_rose( width=width, labels=True, - position=Position((20, yval_top), cstype="mapcoords"), + position=Position((20, y_top), cstype="mapcoords"), fancy=True, ) @@ -47,7 +46,7 @@ fig.directional_rose( width=width, labels=True, - position=Position((45, yval_top), cstype="mapcoords"), + position=Position((45, y_top), cstype="mapcoords"), fancy=2, ) @@ -56,19 +55,19 @@ fig.directional_rose( width=width, labels=True, - position=Position((70, yval_top), cstype="mapcoords"), + position=Position((70, y_top), cstype="mapcoords"), fancy=3, ) -# 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. # Colors of the rose and labels are defined via # MAP_TICK_PEN_PRIMARY and FONT_TITLE, respectively with pygmt.config(MAP_TICK_PEN_PRIMARY="purple", FONT_TITLE="8p,darkmagenta"): fig.directional_rose( width=width, labels=True, - position=Position((0, yval_bottom), cstype="mapcoords"), + position=Position((0, y_bottom), cstype="mapcoords"), ) # Fancy, 1.5 cm wide rose of level 1 with only one label indicating the North @@ -82,7 +81,7 @@ fig.directional_rose( width=width, labels=["", "", "", "N"], - position=Position((20, yval_bottom), cstype="mapcoords"), + position=Position((20, y_bottom), cstype="mapcoords"), fancy=True, ) @@ -97,7 +96,7 @@ fig.directional_rose( width=width, labels=["W", "E", "", ""], - position=Position((45, yval_bottom), cstype="mapcoords"), + position=Position((45, y_bottom), cstype="mapcoords"), fancy=2, ) @@ -112,7 +111,7 @@ fig.directional_rose( width=width, labels=["", "", "South", "North"], - position=Position((70, yval_bottom), cstype="mapcoords"), + position=Position((70, y_bottom), cstype="mapcoords"), fancy=3, ) From 72b8683c9dfa82689183b1579bc8e7dde450975a Mon Sep 17 00:00:00 2001 From: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Date: Thu, 29 Jan 2026 06:52:57 +0100 Subject: [PATCH 17/19] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com> --- examples/gallery/embellishments/map_roses.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/examples/gallery/embellishments/map_roses.py b/examples/gallery/embellishments/map_roses.py index 229c65d0254..1b785daf94a 100644 --- a/examples/gallery/embellishments/map_roses.py +++ b/examples/gallery/embellishments/map_roses.py @@ -18,14 +18,11 @@ fig = pygmt.Figure() -region = [-5, 80, -10, 32] -projection = "M10c" - -y_top = 20 -y_bottom = 0 +yval_top = 20 +yval_bottom = 0 width = "1.5c" -fig.basemap(region=region, projection=projection, frame=True) +fig.basemap(region=[-5, 80, -10, 32], projection="M10c", frame=True) # 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 From 55a7de72ee8996e53c0798c70cc8cd19a0a82381 Mon Sep 17 00:00:00 2001 From: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Date: Thu, 29 Jan 2026 10:33:08 +0100 Subject: [PATCH 18/19] Update examples/gallery/embellishments/map_roses.py Co-authored-by: Dongdong Tian --- examples/gallery/embellishments/map_roses.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/gallery/embellishments/map_roses.py b/examples/gallery/embellishments/map_roses.py index 1b785daf94a..105e1cb4165 100644 --- a/examples/gallery/embellishments/map_roses.py +++ b/examples/gallery/embellishments/map_roses.py @@ -1,4 +1,4 @@ -r""" +""" Directional map roses ===================== From 6f57880b8b0fe4c38240220c70edd5819de475e2 Mon Sep 17 00:00:00 2001 From: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Date: Thu, 29 Jan 2026 10:34:38 +0100 Subject: [PATCH 19/19] Update map_roses.py --- examples/gallery/embellishments/map_roses.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/gallery/embellishments/map_roses.py b/examples/gallery/embellishments/map_roses.py index 105e1cb4165..eea3d3904c0 100644 --- a/examples/gallery/embellishments/map_roses.py +++ b/examples/gallery/embellishments/map_roses.py @@ -18,8 +18,8 @@ fig = pygmt.Figure() -yval_top = 20 -yval_bottom = 0 +y0 = 20 +y1 = 0 width = "1.5c" fig.basemap(region=[-5, 80, -10, 32], projection="M10c", frame=True) @@ -27,14 +27,14 @@ # 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 fig.directional_rose( - width=width, labels=True, position=Position((0, yval_top), cstype="mapcoords") + width=width, labels=True, position=Position((0, y0), cstype="mapcoords") ) # Fancy, 1.5 cm wide rose of level 1 and labels indicating the different directions fig.directional_rose( width=width, labels=True, - position=Position((20, y_top), cstype="mapcoords"), + position=Position((20, y0), cstype="mapcoords"), fancy=True, ) @@ -43,7 +43,7 @@ fig.directional_rose( width=width, labels=True, - position=Position((45, y_top), cstype="mapcoords"), + position=Position((45, y0), cstype="mapcoords"), fancy=2, ) @@ -52,7 +52,7 @@ fig.directional_rose( width=width, labels=True, - position=Position((70, y_top), cstype="mapcoords"), + position=Position((70, y0), cstype="mapcoords"), fancy=3, ) @@ -64,7 +64,7 @@ fig.directional_rose( width=width, labels=True, - position=Position((0, y_bottom), cstype="mapcoords"), + position=Position((0, y1), cstype="mapcoords"), ) # Fancy, 1.5 cm wide rose of level 1 with only one label indicating the North @@ -78,7 +78,7 @@ fig.directional_rose( width=width, labels=["", "", "", "N"], - position=Position((20, y_bottom), cstype="mapcoords"), + position=Position((20, y1), cstype="mapcoords"), fancy=True, ) @@ -93,7 +93,7 @@ fig.directional_rose( width=width, labels=["W", "E", "", ""], - position=Position((45, y_bottom), cstype="mapcoords"), + position=Position((45, y1), cstype="mapcoords"), fancy=2, ) @@ -108,7 +108,7 @@ fig.directional_rose( width=width, labels=["", "", "South", "North"], - position=Position((70, y_bottom), cstype="mapcoords"), + position=Position((70, y1), cstype="mapcoords"), fancy=3, )