Skip to content

Commit

Permalink
Clarify color list looping
Browse files Browse the repository at this point in the history
  • Loading branch information
viljarjf committed Nov 8, 2023
1 parent 7e6cb6d commit 24f13b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyxem/utils/plotting_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def plot_templates_over_signal(
The (x, y) position of the direct beam in pixel coordinates. Takes
precedence over `find_direct_beam`
marker_colors : list of str, optional
Colors of the spot markers. Must be at least n_best long.
Colors of the spot markers. Should be at least n_best long, otherwise colors will loop.
Defaults to matplotlib's default color cycle
marker_type : str, optional
Type of marker used for the spots
Expand All @@ -179,7 +179,7 @@ def plot_templates_over_signal(
marker_colors = plt.rcParams['axes.prop_cycle'].by_key()['color']

if len(marker_colors) < n_best:
print("Warning: not enough colors in `marker_colors` for `n_best` different colored marks")
print("Warning: not enough colors in `marker_colors` for `n_best` different colored marks. Colors will loop")

# Add markers as iterable, recommended in hyperspy docs.
# Using a genenerator will hopefully reduce memory.
Expand Down

0 comments on commit 24f13b9

Please sign in to comment.