Skip to content

Commit 7aa50bd

Browse files
committed
Add more doctests
1 parent 072fde2 commit 7aa50bd

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

pygmt/src/colorbar.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,25 @@ def _build_frame(
3131
"""
3232
Create the list of Alias objects for the -B option.
3333
34-
>>> list(_build_frame(annot=1, tick=0.5, label="Distance", unit="Depth"))
35-
['xa1f0.5+lDistance', 'y+lDepth']
34+
>>> list(_build_frame(annot=1, tick=0.5, label="Distance", unit="km"))
35+
['xa1f0.5+lDistance', 'y+lkm']
36+
37+
>>> list(
38+
... _build_frame(
39+
... annot=1,
40+
... tick=0.5,
41+
... grid=0.2,
42+
... annot_angel=30,
43+
... annot_prefix="m",
44+
... annot_unit="s",
45+
... label="Distance",
46+
... unit="km",
47+
... )
48+
... )
49+
['xa1f0.5g0.2a30+m+s+lDistance', 'y+lkm']
50+
>>> list(_build_frame(frame=["xaf0.5+lDistance", "y+lkm"])))
51+
['xaf0.5+lDistance', 'y+lkm']
52+
3653
"""
3754
# Using the old 'frame' parameter.
3855
if frame is not None and frame is not False:

0 commit comments

Comments
 (0)