Skip to content

Commit 29e8645

Browse files
committed
Update custom viz documentation to remove config_opts/config file
1 parent 4d7bf23 commit 29e8645

File tree

1 file changed

+23
-25
lines changed

1 file changed

+23
-25
lines changed

doc/documentation/custom_viz.rst

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,17 @@ have to delve into the underlying engine to get a different look.
1212
Changing the display background
1313
-------------------------------
1414

15-
The display background can take any valid matplotlib color.
15+
The display background can take any valid matplotlib color (i.e.,
16+
it can be a tuple of rgb values, an rgb hex string, or a named HTML
17+
color.
18+
19+
Changing the display size
20+
-------------------------
21+
22+
The default display window is 800px by 800px, but this is also
23+
customizable. You can set the size of a square window with the ``size``
24+
parameter or make a rectangular window with the ``width`` and ``height``
25+
parameters.
1626

1727
Changing the curvature color scheme
1828
-----------------------------------
@@ -22,45 +32,33 @@ cortical curvature values, so you can see which patches of cortex
2232
are gyri and which are sulci (pass ``curv=False`` to the
2333
:class:`Brain` constructor, or use the ``-no-curv`` switch in the
2434
command-line interface to turn this off). There are four preset
25-
themes for the curvature color scheme: ``classic``, ``bone``,
26-
``high_contrast``, and ``low_contrast``:
35+
themes for the curvature color scheme, which you can pass to the
36+
``cortex`` parameter in the :class:`Brain` constructor: ``classic``,
37+
``bone``, ``high_contrast``, and ``low_contrast``:
2738

2839
.. image:: ../_static/cortex_options.png
2940

3041
Note that, in each theme, the darker color signifies sulci.
3142

32-
Changing the display size
33-
-------------------------
43+
It's also possible to customize this further by passing the name of
44+
a mayavi colormap or a colormap name along with the endpoints of the
45+
colormap and whether it should be reversed.
3446

35-
The default display window is 800px by 800px, but this is also
36-
customizable. You may use any positive number for the size
37-
(subject, possibly, to Mayavi/hardware limitations we are not
38-
aware of). The viewing window is always square, so just give one
39-
number and it will be used for both width and height.
47+
Additionally, you can load a continuous curvature map with the
48+
:func:`add_morphometry` method.
4049

4150
How to use these themes
4251
-----------------------
4352

44-
These options can be set in three places. The first is in your
45-
config file. Set your preferred visualization theme there, and it
46-
will be used automatically whenever you start PySurfer. You may
47-
also override this theme for any individual visualization session.
48-
If using the Python ``surfer`` library, you may pass a
49-
``config_opts`` dictionary to the :class:`Brain` constructor,
50-
which will override any values you have set in your config file.
51-
If using the command-line interface, there are parameters for each
52-
of the above options. Regardless of method, the key names are
53-
``background``, ``cortex``, and ``size``.
54-
55-
For example:
53+
These options can be selected either as keyword arguments to the
54+
:class:`Brain` constructor,
5655

5756
.. sourcecode:: ipython
5857

5958
In [1]: from surfer import Brain
60-
In [2]: b = Brain('fsaverage', 'lh', 'inflated', config_opts={'cortex':'bone'})
59+
In [2]: b = Brain('fsaverage', 'lh', 'inflated', cortex='bone')
6160

62-
or::
61+
or as options in the command-line interface::
6362

6463
pysurfer fsaverage lh inflated -background slategray -size 400
6564

66-
in your shell terminal.

0 commit comments

Comments
 (0)