@@ -1826,10 +1826,13 @@ def plot_evoked_joint(
18261826 between the first and last time instant will be shown. If ``"peaks"``,
18271827 finds time points automatically by checking for 3 local maxima in
18281828 Global Field Power. Defaults to ``"peaks"``.
1829- If a dict, the key must be ``"peaks"`` with a value of either an integer
1830- (number of peaks to find) or a list/tuple of tuples (time windows to
1831- find a peak in). If you want to use evenly spaced time points in an
1832- interval, use :func:`numpy.linspace`.
1829+ If a dict, the key must be ``"peaks"`` and the value
1830+ can be :
1831+ * an int (number of peaks to find over the whole epoch)
1832+ * a list of tuples (time windows to find one peak in each)
1833+
1834+ Defaults to ``"peaks"``. If you want to use evenly spaced time points in
1835+ an interval, use :func:`numpy.linspace`.
18331836 title : str | None
18341837 The title. If ``None``, suppress printing channel type title. If an
18351838 empty string, a default title is created. Defaults to ''. If custom
@@ -1896,14 +1899,18 @@ def plot_evoked_joint(
18961899 n_topomaps = 3 + 1
18971900 elif isinstance (times , dict ) and "peaks" in times :
18981901 if len (times ) != 1 :
1899- raise ValueError ("If 'times' is a dict, it must have only one key 'peaks'." )
1902+ raise ValueError (
1903+ "If 'times' is a dict, it must have only one key 'peaks'."
1904+ )
19001905 val = times ["peaks" ]
19011906 if isinstance (val , int ):
19021907 n_topomaps = val + 1
19031908 elif isinstance (val , (list , tuple )):
19041909 n_topomaps = len (val ) + 1
19051910 else :
1906- raise ValueError ("Values for 'peaks' must be int or list/tuple of tuples." )
1911+ raise ValueError (
1912+ "Values for 'peaks' must be int or list/tuple of tuples."
1913+ )
19071914 else :
19081915 assert not isinstance (times , str )
19091916 n_topomaps = len (times ) + 1
0 commit comments