Skip to content

Commit 308eef4

Browse files
committed
ENH: Add image, clarify doc
1 parent e8483f0 commit 308eef4

File tree

4 files changed

+21
-9
lines changed

4 files changed

+21
-9
lines changed

bin/pysurfer

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,14 @@ if __name__ == '__main__':
6868
argdict = args.__dict__
6969
config_opts = dict([(k, v) for k, v in argdict.items()
7070
if k in confkeys and v])
71+
if 'views' in argdict.keys():
72+
views = argdict['views'].split(',')
73+
else:
74+
views = 'lat'
7175

7276
# Load up the figure and underlying brain object
7377
b = Brain(args.subject_id, args.hemi, args.surf, args.curv,
74-
args.title, config_opts=config_opts)
78+
args.title, views=views, config_opts=config_opts)
7579

7680
# Maybe load some morphometry
7781
if args.morphometry is not None:

doc/_static/split_view.png

115 KB
Loading

doc/documentation/split_brain.rst

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,28 @@ Working with a split-screen brain
44
=================================
55

66
The split-screen view can be activated by using the argument ``hemi='split'``.
7-
This will put views of the left hemisphere in consecutive vertical frames
8-
on the left, and views of the right hemisphere in consecutive vertical
9-
frames on the right. For example, running the following::
7+
Using this option will put views of the left hemisphere in consecutive
8+
vertical frames on the left, and views of the right hemisphere in
9+
consecutive vertical frames on the right. For example, running the following::
1010

11-
brain = Brain('fsaverage', 'split', 'inflated',
12-
views=['lat', 'med', 'ven'])
11+
brain = Brain('fsaverage', 'split', 'inflated', views=['lat', 'med'])
1312

14-
Will produce a window with two columns (hemispheres) and three rows (the
15-
lateral, medial, and vental views, respectively).
13+
Will produce a window with two columns (hemispheres) and two rows (the
14+
lateral and medial views, respectively), shown below.
15+
16+
.. image:: ../../_static/split_view.png
1617

1718
Adding and displaying data
1819
--------------------------
1920

2021
Data can be added to either hemisphere using the same functions that are
2122
normally used, e.g. ``add_data``, ``add_overlay``, ``add_morphometry``.
22-
The objects are automatically shown on all views of the brain.
23+
The objects are automatically shown on all views of the brain. When
24+
calling these functions, the ``hemi`` keyword argument can be set to
25+
``hemi='lh'`` or ``hemi='rh'`` to specify the hemisphere to plot to.
26+
In some instances (e.g., ``add_morphometry``), if no keyword argument
27+
is provided, PySurfer will attempt to load data or both hemispheres
28+
automtically.
2329

2430
Note that the ``show_view`` method accepts arguments for the ``row`` and
2531
``col`` values, which allow the user to control which ``Brain`` panel

surfer/_commandline.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,5 @@
6767
help="colormap for binary cortex curvature")
6868
parser.add_argument("-title",
6969
help="title to use for the figure")
70+
parser.add_argument("-views",
71+
help="view list (comma-separated) to use")

0 commit comments

Comments
 (0)