Skip to content

Commit 0129278

Browse files
committed
STY: Adding better doc for save_image, screenshot
1 parent 64ab812 commit 0129278

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

surfer/viz.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,6 +1648,13 @@ def save_image(self, fname=None, row=-1, col=-1):
16481648
row index of the brain to use
16491649
col : int
16501650
column index of the brain to use
1651+
1652+
Due to limitations in TraitsUI, if multiple views or hemi='split'
1653+
is used, there is no guarantee painting of the windows will
1654+
complete before control is returned to the command line. Thus
1655+
we strongly recommend using only one figure window (which uses
1656+
a Mayavi figure to plot instead of TraitsUI) if you intend to
1657+
script plotting commands.
16511658
"""
16521659
try:
16531660
from mayavi import mlab
@@ -1685,6 +1692,15 @@ def screenshot(self, mode='rgb', antialiased=False, row=-1, col=-1):
16851692
-------
16861693
screenshot: array
16871694
Image pixel values
1695+
1696+
Notes
1697+
-----
1698+
Due to limitations in TraitsUI, if multiple views or hemi='split'
1699+
is used, there is no guarantee painting of the windows will
1700+
complete before control is returned to the command line. Thus
1701+
we strongly recommend using only one figure window (which uses
1702+
a Mayavi figure to plot instead of TraitsUI) if you intend to
1703+
script plotting commands.
16881704
"""
16891705
try:
16901706
from mayavi import mlab

0 commit comments

Comments
 (0)