diff --git a/phys2bids/phys2bids.py b/phys2bids/phys2bids.py
index 4bf09d1..c3b3ec7 100644
--- a/phys2bids/phys2bids.py
+++ b/phys2bids/phys2bids.py
@@ -254,7 +254,8 @@ def phys2bids(filename, info=False, indir='.', outdir='.', heur_file=None,
     phys_in.print_info(filename)
     # #!# Here the function viz.plot_channel should be called
     if chplot != '' or info:
-        viz.plot_all(phys_in, infile, chplot)
+        viz.plot_all(phys_in.ch_name, phys_in.timeseries, phys_in.units,
+                     phys_in.freq, infile, chplot)
     # If only info were asked, end here.
     if info:
         return
diff --git a/phys2bids/viz.py b/phys2bids/viz.py
index 4fb6970..d925f6c 100644
--- a/phys2bids/viz.py
+++ b/phys2bids/viz.py
@@ -14,8 +14,12 @@ FIGSIZE = (18, 10)
 def plot_trigger(time, trigger, fileprefix, tr, thr, num_timepoints_expected,
                  filename, figsize=FIGSIZE, dpi=SET_DPI):
     """
-    Produces a textfile of the specified extension `ext`,
-    containing the given content `text`.
+    Produces a figure with three plots:
+    1. Plots the triggers in blue, a block in orange that indicates
+    the time from the first trigger to the last, and a red line showing
+    the threshold used for trigger detection
+    2. Same plot but showing only the intial trigger
+    3. Same plot but showing only the intial trigger
 
     Parameters
     ----------
@@ -26,15 +30,19 @@ def plot_trigger(time, trigger, fileprefix, tr, thr, num_timepoints_expected,
     fileprefix: str or path
         A string representing a file name or a fullpath
         to a file, WITHOUT extension
+    tr: float
+        Repetition time
+    thr: float
+        Threshold used to detect the number of triggers
+    num_timepoints_expected: int
+        Number of timepoints expected by the user
     filename: string
         name of the original file
-    options: argparse object
-        The object produced by `get_parser` in `cli.run.py`
-    figsize: tuple
-        Desired size of the figure (see `matplotlib`),
+    figsize: tuple or list of floats
+        Size of the figure expressed as (size_x, size_y),
         Default is {FIGSIZE}
     dpi: int
-        Desired DPI of the figure (see `matplotlib`),
+        Desired DPI of the figure,
         Default is {SET_DPI}
 
     Notes
@@ -42,6 +50,11 @@ def plot_trigger(time, trigger, fileprefix, tr, thr, num_timepoints_expected,
     Outcome:
     fileprefix + _trigger_time.png:
         Creates new plot `fileprefix_trigger_time.png`.
+
+    See Also
+    --------
+    https://phys2bids.readthedocs.io/en/latest/howto.html
+    matplotlib.pyploy.figsize
     """
 
     def time2ntr(x):
@@ -114,19 +127,55 @@ def plot_trigger(time, trigger, fileprefix, tr, thr, num_timepoints_expected,
     plt.close()
 
 
-def plot_all(phys_in, infile, outfile='', dpi=SET_DPI, size=FIGSIZE):
-    ch_num = len(phys_in.ch_name)  # get number of channels:
+def plot_all(ch_name, timeseries, units, freq, infile, outfile='', dpi=SET_DPI, size=FIGSIZE):
+    """
+    Plots all the channels for visualizations and saves them in outfile
+
+    Parameters
+    ----------
+    ch_name: (ch) list of strings
+        List of names of the channels - can be the header of the columns
+        in the output files.
+    timeseries: (ch, [tps]) list
+        List of numpy 1d arrays - one for channel, plus one for time.
+        Time channel has to be the first, trigger the second.
+        Contains all the timeseries recorded.
+    units: (ch) list of strings
+        List of the units of the channels.
+    freq: (ch) list of floats
+        List of floats - one per channel.
+        Contains all the frequencies of the recorded channel.
+    infile: string
+        name of the input file to phys2bids
+    outfile: string
+        path of the output plot
+    dpi: int
+        Desired DPI of the figure,
+        Default is {SET_DPI}
+    figsize: tuple or list of floats
+        Size of the figure expressed as (size_x, size_y),
+        Default is {FIGSIZE}
+    -----
+    outcome:
+        Creates new plot with path specified in outfile.
+
+    See Also
+    --------
+    https://phys2bids.readthedocs.io/en/latest/howto.html
+    matplotlib.pyploy.figsize
+    """
+    ch_num = len(ch_name)  # get number of channels:
     fig, ax = plt.subplots(ch_num - 1, 1, figsize=size, sharex=True)
-    time = phys_in.timeseries[0]  # assume time is first channel
+    time = timeseries[0]  # assume time is first channel
     fig.suptitle(os.path.basename(infile))
-    for row, timeser in enumerate(phys_in.timeseries[1:]):
+    for row, timeser in enumerate(timeseries[1:]):
         if timeser.shape != time.shape:
             time_old = np.linspace(0, time[-1], num=timeser.shape[0])
             timeser = np.interp(time, time_old, timeser)
         ax[row].plot(time, timeser)
-        ax[row].set_title(f' Channel {row + 1}: {phys_in.ch_name[row + 1]}')
-        ax[row].set_ylabel(phys_in.units[row + 1])
-        ax[row].xlim = 30 * 60 * phys_in.freq[0]  # maximum display of half an hour
+        ax[row].set_title(f' Channel {row + 1}: {ch_name[row + 1]}')
+        ax[row].set_ylabel(units[row + 1])
+        ax[row].xlim = 30 * 60 * freq[0]  # maximum display of half an hour
         ax[row].grid()
     ax[row].set_xlabel("seconds")
     if outfile == '':

Update docstrings in viz.py
<!--- Provide a general summary of the issue in the Title above -->

## Detailed Description
<!--- Provide a detailed description of the change or addition you are proposing -->
At the moment, the docstring of the functions in `viz.py` are either outdated (after #153) or missing (for `plot_all`).

## Context / Motivation
<!--- Why is this change important to you? How would you use it? -->
<!--- How can it benefit other users? -->
We should update the docstrings for both users and developers.

## Possible Implementation
<!--- Not obligatory, but suggest an idea for implementing addition or change -->
<!--- If you already have worked on the idea, please share a link to the branch in your forked project -->
@vinferrer, as you are the main author of the `viz.py` function, could you tackle this issue?
diff --git a/phys2bids/tests/test_viz.py b/phys2bids/tests/test_viz.py
index edc8132..65b444a 100644
--- a/phys2bids/tests/test_viz.py
+++ b/phys2bids/tests/test_viz.py
@@ -9,7 +9,8 @@ def test_plot_all(samefreq_full_acq_file):
     test_path, test_filename = os.path.split(samefreq_full_acq_file)
     phys_obj = acq.populate_phys_input(samefreq_full_acq_file, chtrig)
     out = os.path.join(test_path, 'Test_belt_pulse_samefreq.png')
-    viz.plot_all(phys_obj, test_filename, outfile=out)
+    viz.plot_all(phys_obj.ch_name, phys_obj.timeseries, phys_obj.units,
+                 phys_obj.freq, test_filename, outfile=out)
     assert os.path.isfile(out)
 
 

pip install -e .[all]
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-xdist
apt-get update apt-get install -y gcc
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.16
babel==2.17.0
bioread==3.0.1
certifi==2025.1.31
charset-normalizer==3.4.1
contourpy==1.3.0
coverage==7.8.0
cycler==0.12.1
docopt==0.6.2
docutils==0.21.2
exceptiongroup==1.2.2
execnet==2.1.1
flake8==7.2.0
fonttools==4.56.0
idna==3.10
imagesize==1.4.1
importlib_metadata==8.6.1
importlib_resources==6.5.2
iniconfig==2.1.0
Jinja2==3.1.6
kiwisolver==1.4.7
MarkupSafe==3.0.2
matplotlib==3.9.4
mccabe==0.7.0
numpy==2.0.2
packaging==24.2
-e git+https://github.com/physiopy/phys2bids.git@07bec6aa41d2cc1a2da4383b8dcf112bf9775734#egg=phys2bids
pillow==11.1.0
pluggy==1.5.0
pycodestyle==2.13.0
pyflakes==3.3.1
Pygments==2.19.1
pyparsing==3.2.3
pytest==8.3.5
pytest-cov==6.0.0
pytest-xdist==3.6.1
python-dateutil==2.9.0.post0
requests==2.32.3
six==1.17.0
snowballstemmer==2.2.0
Sphinx==7.4.7
sphinx-argparse==0.4.0
sphinx-rtd-theme==3.0.2
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
tomli==2.2.1
urllib3==2.3.0
zipp==3.21.0

name: phys2bids
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.16
      - babel==2.17.0
      - bioread==3.0.1
      - certifi==2025.1.31
      - charset-normalizer==3.4.1
      - contourpy==1.3.0
      - coverage==7.8.0
      - cycler==0.12.1
      - docopt==0.6.2
      - docutils==0.21.2
      - exceptiongroup==1.2.2
      - execnet==2.1.1
      - flake8==7.2.0
      - fonttools==4.56.0
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==8.6.1
      - importlib-resources==6.5.2
      - iniconfig==2.1.0
      - jinja2==3.1.6
      - kiwisolver==1.4.7
      - markupsafe==3.0.2
      - matplotlib==3.9.4
      - mccabe==0.7.0
      - numpy==2.0.2
      - packaging==24.2
      - pillow==11.1.0
      - pluggy==1.5.0
      - pycodestyle==2.13.0
      - pyflakes==3.3.1
      - pygments==2.19.1
      - pyparsing==3.2.3
      - pytest==8.3.5
      - pytest-cov==6.0.0
      - pytest-xdist==3.6.1
      - python-dateutil==2.9.0.post0
      - requests==2.32.3
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sphinx==7.4.7
      - sphinx-argparse==0.4.0
      - sphinx-rtd-theme==3.0.2
      - sphinxcontrib-applehelp==2.0.0
      - sphinxcontrib-devhelp==2.0.0
      - sphinxcontrib-htmlhelp==2.1.0
      - sphinxcontrib-jquery==4.1
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==2.0.0
      - sphinxcontrib-serializinghtml==2.0.0
      - tomli==2.2.1
      - urllib3==2.3.0
      - zipp==3.21.0
prefix: /opt/conda/envs/phys2bids

phys2bids/tests/test_viz.py::test_plot_all
phys2bids/tests/test_viz.py::test_plot_trigger
phys2bids/phys2bids.py phys2bids/viz.py
phys2bids/phys2bids.py phys2bids/viz.py