From 2c9d2c893b540dd11e126b1da84a4c8bc4e8048d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Wed, 7 Oct 2026 09:21:14 +0200 Subject: [PATCH 1/3] Add code for inline examles of rose --- pygmt/src/rose.py | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/pygmt/src/rose.py b/pygmt/src/rose.py index 1c59d87fc68..d7dca7a92f5 100644 --- a/pygmt/src/rose.py +++ b/pygmt/src/rose.py @@ -209,6 +209,50 @@ def rose( $perspective $transparency $wrap + + Examples + -------- + XXXX + + >>> import pygmt + >>> from pygmt.params import Axis, Frame + >>> + >>> # Load sample compilation of fracture lengths and azimuth as + >>> # hypothetically digitized from geological maps + >>> data = pygmt.datasets.load_sample_data(name="fractures") + >>> # OR use some random numbers + + XXX + + >>> fig = pygmt.Figure() + >>> fig.rose( + ... data=data, + ... region=[0, 1, 0, 360], + ... diameter="7.5c", + ... sector="5", + ... norm=True, + ... frame=True, + ... fill="bisque", + ... pen="1p,brown", + ... ) + >>> fig.show() + + XXX + + >>> fig = pygmt.Figure() + >>> fig.rose( + ... length=data.length, + ... azimuth=data.azimuth, + ... region=[0, 1, 0, 360], + ... diameter="7.5c", + ... sector="10+r", + ... norm=True, + ... fill="bisque", + ... frame=Frame(xaxis=Axis(grid=0.2), yaxis=Axis(grid=30)), + ... pen="1p,brown", + ... ) + >>> fig.show() + """ aliasdict = AliasSystem(C=Alias(cmap, name="cmap")).add_common( B=frame, From b4bb63bb316a0fb6dea95bcd9f3ca9cb4ad30f43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Wed, 7 Oct 2026 09:21:55 +0200 Subject: [PATCH 2/3] Exclude inline examples from tests --- pygmt/src/rose.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pygmt/src/rose.py b/pygmt/src/rose.py index d7dca7a92f5..b028cbd1ba8 100644 --- a/pygmt/src/rose.py +++ b/pygmt/src/rose.py @@ -11,6 +11,8 @@ from pygmt.helpers import build_arg_list, fmt_docstring, use_alias from pygmt.params import Axis, Frame +__doctest_skip__ = ["rose"] + @fmt_docstring @use_alias( From 6431097704679b3abe6ca22a7fb8c7b8f0569add Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Sat, 10 Oct 2026 11:14:15 +0200 Subject: [PATCH 3/3] Add comments --- pygmt/src/rose.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pygmt/src/rose.py b/pygmt/src/rose.py index b028cbd1ba8..026108041bc 100644 --- a/pygmt/src/rose.py +++ b/pygmt/src/rose.py @@ -214,17 +214,14 @@ def rose( Examples -------- - XXXX + Load a dataset on fracture lengths and azimuths into a pandas DataFrame. >>> import pygmt >>> from pygmt.params import Axis, Frame >>> - >>> # Load sample compilation of fracture lengths and azimuth as - >>> # hypothetically digitized from geological maps >>> data = pygmt.datasets.load_sample_data(name="fractures") - >>> # OR use some random numbers - XXX + Create a sector diagram. >>> fig = pygmt.Figure() >>> fig.rose( @@ -239,7 +236,7 @@ def rose( ... ) >>> fig.show() - XXX + Create a rose diagram. >>> fig = pygmt.Figure() >>> fig.rose(