Repository: nilearn/nilearn

Issue:
nilearn.plotting: threshold argument not in docstring
Several plotting functions do not seem to mention the "threshold" argument in their respective docstrings. This appears to be the case for: plot_epi, plot_roi and plot_stat_map.

Should those be added?



Discussion:
That'd be great. You could reuse the threshold parameter doc in plot_img. You could even improve it, in particular I would use something like values below the threshold **in absolute value** to be more clear.


Resolving patch:
diff --git a/nilearn/plotting/img_plotting.py b/nilearn/plotting/img_plotting.py
--- a/nilearn/plotting/img_plotting.py
+++ b/nilearn/plotting/img_plotting.py
@@ -146,9 +146,9 @@ def plot_img(niimg, cut_coords=None, output_file=None, display_mode='ortho',
         threshold : a number, None, or 'auto'
             If None is given, the image is not thresholded.
             If a number is given, it is used to threshold the image:
-            values below the threshold are plotted as transparent. If
-            auto is given, the threshold is determined magically by
-            analysis of the image.
+            values below the threshold (in absolute value) are plotted
+            as transparent. If auto is given, the threshold is determined
+            magically by analysis of the image.
         annotate: boolean, optional
             If annotate is True, positions and left/right annotation
             are added to the plot.
@@ -332,6 +332,12 @@ def plot_anat(anat_img=MNI152TEMPLATE, cut_coords=None,
             savefig.
         cmap: matplotlib colormap, optional
             The colormap for the anat
+        threshold : a number, None, or 'auto'
+            If None is given, the image is not thresholded.
+            If a number is given, it is used to threshold the image:
+            values below the threshold (in absolute value) are plotted
+            as transparent. If auto is given, the threshold is determined
+            magically by analysis of the image.
 
         Notes
         -----
@@ -401,6 +407,12 @@ def plot_epi(epi_img=None, cut_coords=None, output_file=None,
             savefig.
         cmap: matplotlib colormap, optional
             The colormap for the anat
+        threshold : a number, None, or 'auto'
+            If None is given, the image is not thresholded.
+            If a number is given, it is used to threshold the image:
+            values below the threshold (in absolute value) are plotted
+            as transparent. If auto is given, the threshold is determined
+            magically by analysis of the image.
 
         Notes
         -----
@@ -466,6 +478,12 @@ def plot_roi(roi_img, bg_img=MNI152TEMPLATE, cut_coords=None,
             you whish to save figures with a black background, you
             will need to pass "facecolor='k', edgecolor='k'" to pylab's
             savefig.
+        threshold : a number, None, or 'auto'
+            If None is given, the image is not thresholded.
+            If a number is given, it is used to threshold the image:
+            values below the threshold (in absolute value) are plotted
+            as transparent. If auto is given, the threshold is determined
+            magically by analysis of the image.
 
     """
     bg_img, black_bg, bg_vmin, bg_vmax = _load_anat(bg_img, dim=dim,
@@ -525,6 +543,12 @@ def plot_stat_map(stat_map_img, bg_img=MNI152TEMPLATE, cut_coords=None,
             figure is used.
         title : string, optional
             The title dispayed on the figure.
+        threshold : a number, None, or 'auto'
+            If None is given, the image is not thresholded.
+            If a number is given, it is used to threshold the image:
+            values below the threshold (in absolute value) are plotted
+            as transparent. If auto is given, the threshold is determined
+            magically by analysis of the image.
         annotate: boolean, optional
             If annotate is True, positions and left/right annotation
             are added to the plot.
diff --git a/nilearn/plotting/slicers.py b/nilearn/plotting/slicers.py
--- a/nilearn/plotting/slicers.py
+++ b/nilearn/plotting/slicers.py
@@ -308,10 +308,11 @@ def add_overlay(self, img, threshold=1e-6, colorbar=False, **kwargs):
             img: niimg-like
                 The nifti-image-like. If it is a masked array, only
                 the non-masked part will be plotted.
-            threshold : a number, None, or 'auto'
+            threshold : a number, None
                 If None is given, the maps are not thresholded.
                 If a number is given, it is used to threshold the maps:
-                values below the threshold are plotted as transparent.
+                values below the threshold (in absolute value) are
+                plotted as transparent.
             colorbar: boolean, optional
                 If True, display a colorbar on the right of the plots.
             kwargs:


Test patch: