diff --git a/src/scilpy/cli/scil_tractogram_assign_custom_color.py b/src/scilpy/cli/scil_tractogram_assign_custom_color.py index 78ecefc09..a754d7fa2 100755 --- a/src/scilpy/cli/scil_tractogram_assign_custom_color.py +++ b/src/scilpy/cli/scil_tractogram_assign_custom_color.py @@ -119,8 +119,9 @@ def _build_arg_parser(): 'approximation. Default if set is 4.') g2.add_argument('--colormap', default='jet', help='Select the colormap for colored trk (dps/dpp) ' - '[%(default)s].\nUse two Matplotlib named color separeted ' - 'by a - to create your own colormap.') + '[%(default)s].\nYou may also use two Matplotlib named ' + 'colors separated by a "- to\n create your own colormap. ' + 'Ex: red-blue.') g2.add_argument('--clip_outliers', action='store_true', help="If set, we will clip the outliers (first and last " "5%% quantile). Strongly suggested if your data " diff --git a/src/scilpy/cli/tests/test_tractogram_assign_custom_color.py b/src/scilpy/cli/tests/test_tractogram_assign_custom_color.py index 66cdb82f4..c52ad4b04 100644 --- a/src/scilpy/cli/tests/test_tractogram_assign_custom_color.py +++ b/src/scilpy/cli/tests/test_tractogram_assign_custom_color.py @@ -38,7 +38,8 @@ def test_execution_along_profile(script_runner, monkeypatch): monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) ret = script_runner.run(['scil_tractogram_assign_custom_color', - in_bundle, 'colored2.trk', '--along_profile']) + in_bundle, 'colored2.trk', '--along_profile', + '--colormap', 'red-blue']) assert ret.success diff --git a/src/scilpy/viz/color.py b/src/scilpy/viz/color.py index a76159b25..9a4b4ac11 100644 --- a/src/scilpy/viz/color.py +++ b/src/scilpy/viz/color.py @@ -87,8 +87,9 @@ def get_lookup_table(name): Parameters ---------- name : str - Name of the lookup table (colormap) or a list of named colors - (separated by a -) to form a lookup table (colormap) from. + Name of the lookup table (colormap), ex, jet, or: + Two named colors separated by a -, ex, red-blue, to form a lookup + table (colormap) from. Returns -------