Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3af7638

Browse filesBrowse files
committed
README
1 parent 80940ad commit 3af7638
Copy full SHA for 3af7638

File tree

Expand file treeCollapse file tree

1 file changed

+25
-8
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+25
-8
lines changed

‎README.org

Copy file name to clipboardExpand all lines: README.org
+25-8Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,29 +1354,46 @@ _with='image', tuplesize=3). See the documentation for plot() and class
13541354
gnuplotlib for full details.
13551355

13561356
** wait()
1357-
Waits until the open interactive plot window is closed
1357+
Waits until the given interactive plot window(s) are closed
13581358

13591359
SYNOPSIS
13601360

13611361
#+BEGIN_SRC python
13621362
import numpy as np
13631363
import gnuplotlib as gp
13641364

1365-
gp.plot(np.arange(5))
1366-
1365+
### Waiting for the global plot window
1366+
gp.plot(...)
13671367
# interactive plot pops up
1368-
13691368
gp.wait()
1370-
13711369
# We get here when the user closes the plot window
1370+
1371+
1372+
### Waiting on some arbitrary plots
1373+
plot0 = gp.gnuplotlib(...)
1374+
plot1 = gp.gnuplotlib(...)
1375+
plot0.plot(...)
1376+
plot1.plot(...)
1377+
gp.wait(plot0,plot1)
1378+
# We get here when the user closes the plot windows
13721379
#+END_SRC
13731380

1381+
13741382
DESCRIPTION
13751383

1376-
This applies to the global gnuplotlib object.
1384+
Wait for the interactive plot window(s) to be closed by the user. Without
1385+
any argument this applies to the global gnuplotlib object. Or the specific
1386+
plots to wait for can be given in arguments (in-line or as a single
1387+
iterable):
1388+
1389+
- wait() waits on the global gnuplot object
1390+
1391+
- wait(plot0,plot1)
1392+
- wait((plot0,plot1),) both wait on the given gnuplotlib objects
13771393

1378-
It's not at all trivial to detect if a current plot window exists. If not,
1379-
this function will end up waiting forever, and the user will need to Ctrl-C
1394+
It's not at all trivial to detect if a plot object has an open plot window.
1395+
If it does not, this function will end up waiting forever, and the user will
1396+
need to Ctrl-C
13801397

13811398
** add_plot_option()
13821399
Ingests new key/value pairs into an option dict

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.