On 7 May 2014 11:02, Alexandre Gramfort <notifications@github.com> wrote:

> In mne/viz.py:
>
> > @@ -3873,11 +3877,21 @@ def plot_events(events, sfreq, first_samp=0, show=True):
> >      fig : matplotlib.figure.Figure
> >          The figure object containing the plot.
> >      """
> > +    unique_events = np.unique(events[:, 2])
> > +    if color is None:
> > +        color = COLORS
> > +        if len(unique_events) > len(color):
> > +            warnings.warn('More events than colors available.'
> > +                          'You should pass a list of unique colors.')
>
> I suggestion would be to use itertools.cycle and cycle on colors whetever
> the number of unique events.
>
> would you be ok with that?
>
yes, i'll try...

> —
> Reply to this email directly or view it on GitHub<https://github.com/mne-tools/mne-python/pull/1266/files#r12381741>
> .
>