Skip to content

Commit 9954658

Browse files
committed
Add doctest example for a thick, purple, dash-dot-dash pen
1 parent 5ecea77 commit 9954658

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pygmt/param/pen.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,14 @@ class Pen:
104104
105105
>>> # Very thin, cyan (in c/m/y/k), dot-dot-dashed line
106106
>>> pen = pygmt.param.Pen(width="faint", color="100/0/0/0", style="..-")
107+
108+
>>> # Thick, purple, dashed-dot-dashed border line around some text
109+
>>> pen = pygmt.param.Pen(width="thick", color="purple", style="-.-")
110+
>>> print(pen)
111+
thick,purple,-.-
112+
>>> fig = pygmt.Figure()
113+
>>> fig.text(x=1, y=1, region=[0, 2, 0, 2], pen=pen, text=pen)
114+
>>> fig.show()
107115
"""
108116

109117
width: str = None

0 commit comments

Comments
 (0)