diff --git a/examples/gallery/symbols/points_categorical.py b/examples/gallery/symbols/points_categorical.py index 43331ef3f28..f291c4a4a31 100644 --- a/examples/gallery/symbols/points_categorical.py +++ b/examples/gallery/symbols/points_categorical.py @@ -26,8 +26,8 @@ # Make a list of the individual categories of the 'species' column # ['Adelie', 'Chinstrap', 'Gentoo'] # They are (corresponding to the categorical number code) by default in -# alphabetical order and later used for the colorbar labels -labels = list(df.species.cat.categories) +# alphabetical order and later used for the colorbar annotations +cb_annots = list(df.species.cat.categories) # Use pygmt.info to get region bounds (xmin, xmax, ymin, ymax) # The below example will return a numpy array like [30.0, 60.0, 12.0, 22.0] @@ -65,7 +65,7 @@ # to set the lowest_value and the highest_value of the CPT series=(df.species.cat.codes.min(), df.species.cat.codes.max(), 1), # convert ['Adelie', 'Chinstrap', 'Gentoo'] to 'Adelie,Chinstrap,Gentoo' - color_model="+c" + ",".join(labels), + color_model="+c" + ",".join(cb_annots), ) fig.plot(