Skip to content

Commit 902181f

Browse files
Use GMT-related term 'annotations' in example 'Color points by categories' (#2051)
1 parent 80b3ecb commit 902181f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/gallery/symbols/points_categorical.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
# Make a list of the individual categories of the 'species' column
2727
# ['Adelie', 'Chinstrap', 'Gentoo']
2828
# They are (corresponding to the categorical number code) by default in
29-
# alphabetical order and later used for the colorbar labels
30-
labels = list(df.species.cat.categories)
29+
# alphabetical order and later used for the colorbar annotations
30+
cb_annots = list(df.species.cat.categories)
3131

3232
# Use pygmt.info to get region bounds (xmin, xmax, ymin, ymax)
3333
# The below example will return a numpy array like [30.0, 60.0, 12.0, 22.0]
@@ -65,7 +65,7 @@
6565
# to set the lowest_value and the highest_value of the CPT
6666
series=(df.species.cat.codes.min(), df.species.cat.codes.max(), 1),
6767
# convert ['Adelie', 'Chinstrap', 'Gentoo'] to 'Adelie,Chinstrap,Gentoo'
68-
color_model="+c" + ",".join(labels),
68+
color_model="+c" + ",".join(cb_annots),
6969
)
7070

7171
fig.plot(

0 commit comments

Comments
 (0)