- MNE version: e.g. 0.24.0
- Mac OS 11.6.1
I’m using annotations for purposes other than marking artifacts. Specifically, I’ve partitioned
My data into equal-size time windows and am grouping the time windows into clusters based upon a certain connectivity characteristic. I’d like to assign the same color to windows belonging to the same cluster. An example illustration for a 10 second segment broken into 20 time windows is shown below, where there are five distinct colors corresponding to the five clusters. The Annotations instance was formed using equally placed onsets, fixed duration of .5 sec, and descriptions corresponding to the cluster numbers, e.g. ‘1’, ‘2’,…,’5’.
Am I correct that the function _get_color_list
within mne/viz/utils.py is where colors are determined for annotation purposes?
The following four lines are in this function between lines 1515 and 1522:
from matplotlib import rcParams
color_cycle = rcParams.get('axes.prop_cycle')
colors = color_cycle.by_key()['color']
print(colors)
The output is
[’#1f77b4’, ‘#ff7f0e’, ‘#2ca02c’, ‘#d62728’, ‘#9467bd’, ‘#8c564b’, ‘#e377c2’, ‘#7f7f7f’, ‘#bcbd22’, ‘#17becf’]
Does this mean that in the default configuration, the number of color possibilities for annotations is 10?
If so, could I enlarge the list of colors somehow to highlight a larger number of clusters, e.g. 20 colors in the case I have 20 clusters?