Mercurial > hg > octave-lyh
annotate scripts/plot/private/__gnuplot_open_stream__.m @ 16814:64e7bb01fce2
doc: Improve documentation for 2-D plot functions
* doc/interpreter/plot.txi: Rewrite documentation around get/set.
* libinterp/interpfcn/graphics.cc(Fget, Fset): Add seealso links. Add
additional calling forms for get().
* scripts/plot/bar.m, scripts/plot/barh.m, scripts/plot/comet.m,
scripts/plot/comet3.m, scripts/plot/contour.m, scripts/plot/contour3.m,
scripts/plot/contourc.m, scripts/plot/contourf.m, scripts/plot/errorbar.m,
scripts/plot/gca.m, scripts/plot/gcf.m, scripts/plot/gco.m,
scripts/plot/ishghandle.m, scripts/plot/loglogerr.m, scripts/plot/pareto.m,
scripts/plot/pcolor.m, scripts/plot/pie.m, scripts/plot/pie3.m,
scripts/plot/plotmatrix.m, scripts/plot/plotyy.m, scripts/plot/polar.m,
scripts/plot/quiver.m, scripts/plot/quiver3.m, scripts/plot/rose.m,
scripts/plot/scatter.m, scripts/plot/semilogxerr.m, scripts/plot/semilogyerr.m,
scripts/plot/sombrero.m, scripts/plot/stairs.m, scripts/plot/stem.m,
scripts/plot/stem3.m: Improve docstrings.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 22 Jun 2013 17:40:52 -0700 |
parents | 72c96de7a403 |
children | 1c89599167a6 |
rev | line source |
---|---|
14138
72c96de7a403
maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents:
12793
diff
changeset
|
1 ## Copyright (C) 2009-2012 Ben Abbott |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
2 ## |
11104 | 3 ## This file is part of Octave. |
4 ## | |
5 ## Octave is free software; you can redistribute it and/or modify it | |
6 ## under the terms of the GNU General Public License as published by | |
7 ## the Free Software Foundation; either version 3 of the License, or (at | |
8 ## your option) any later version. | |
9 ## | |
10 ## Octave is distributed in the hope that it will be useful, but | |
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 ## General Public License for more details. | |
14 ## | |
9113
4bb94a71913b
__gnuplot_open_stream__.m: New function and its application.
Ben Abbott <bpabbott@mac.com>
parents:
diff
changeset
|
15 ## You should have received a copy of the GNU General Public License |
4bb94a71913b
__gnuplot_open_stream__.m: New function and its application.
Ben Abbott <bpabbott@mac.com>
parents:
diff
changeset
|
16 ## along with Octave; see the file COPYING. If not, see |
4bb94a71913b
__gnuplot_open_stream__.m: New function and its application.
Ben Abbott <bpabbott@mac.com>
parents:
diff
changeset
|
17 ## <http://www.gnu.org/licenses/>. |
4bb94a71913b
__gnuplot_open_stream__.m: New function and its application.
Ben Abbott <bpabbott@mac.com>
parents:
diff
changeset
|
18 |
4bb94a71913b
__gnuplot_open_stream__.m: New function and its application.
Ben Abbott <bpabbott@mac.com>
parents:
diff
changeset
|
19 ## -*- texinfo -*- |
11472
1740012184f9
Use uppercase for variable names in error() strings to match Info documentation. Only m-files done.
Rik <octave@nomad.inbox5.com>
parents:
11104
diff
changeset
|
20 ## @deftypefn {Function File} {@var{stream} =} __gnuplot_open_stream__ (@var{npipes}, @var{h}) |
9113
4bb94a71913b
__gnuplot_open_stream__.m: New function and its application.
Ben Abbott <bpabbott@mac.com>
parents:
diff
changeset
|
21 ## Undocumented internal function. |
4bb94a71913b
__gnuplot_open_stream__.m: New function and its application.
Ben Abbott <bpabbott@mac.com>
parents:
diff
changeset
|
22 ## @end deftypefn |
4bb94a71913b
__gnuplot_open_stream__.m: New function and its application.
Ben Abbott <bpabbott@mac.com>
parents:
diff
changeset
|
23 |
4bb94a71913b
__gnuplot_open_stream__.m: New function and its application.
Ben Abbott <bpabbott@mac.com>
parents:
diff
changeset
|
24 ## Author: Ben Abbott <bpabbott@mac.com> |
4bb94a71913b
__gnuplot_open_stream__.m: New function and its application.
Ben Abbott <bpabbott@mac.com>
parents:
diff
changeset
|
25 ## Created: 2009-04-11 |
4bb94a71913b
__gnuplot_open_stream__.m: New function and its application.
Ben Abbott <bpabbott@mac.com>
parents:
diff
changeset
|
26 |
4bb94a71913b
__gnuplot_open_stream__.m: New function and its application.
Ben Abbott <bpabbott@mac.com>
parents:
diff
changeset
|
27 function plot_stream = __gnuplot_open_stream__ (npipes, h) |
9461
ff8d7f3ad203
gnuplot_binary.m: accept arguments in addition to program name
John W. Eaton <jwe@octave.org>
parents:
9113
diff
changeset
|
28 [prog, args] = gnuplot_binary (); |
9113
4bb94a71913b
__gnuplot_open_stream__.m: New function and its application.
Ben Abbott <bpabbott@mac.com>
parents:
diff
changeset
|
29 if (npipes > 1) |
9461
ff8d7f3ad203
gnuplot_binary.m: accept arguments in addition to program name
John W. Eaton <jwe@octave.org>
parents:
9113
diff
changeset
|
30 [plot_stream(1), plot_stream(2), pid] = popen2 (prog, args{:}); |
9113
4bb94a71913b
__gnuplot_open_stream__.m: New function and its application.
Ben Abbott <bpabbott@mac.com>
parents:
diff
changeset
|
31 if (pid < 0) |
11588
d5bd2766c640
style fixes for warning and error messages in script files
John W. Eaton <jwe@octave.org>
parents:
11587
diff
changeset
|
32 error ("__gnuplot_open_stream__: failed to open connection to gnuplot"); |
9561
c60a9e1a0372
try to avoid gnuplot zombies
John W. Eaton <jwe@octave.org>
parents:
9461
diff
changeset
|
33 else |
c60a9e1a0372
try to avoid gnuplot zombies
John W. Eaton <jwe@octave.org>
parents:
9461
diff
changeset
|
34 plot_stream(3) = pid; |
9113
4bb94a71913b
__gnuplot_open_stream__.m: New function and its application.
Ben Abbott <bpabbott@mac.com>
parents:
diff
changeset
|
35 endif |
4bb94a71913b
__gnuplot_open_stream__.m: New function and its application.
Ben Abbott <bpabbott@mac.com>
parents:
diff
changeset
|
36 else |
9461
ff8d7f3ad203
gnuplot_binary.m: accept arguments in addition to program name
John W. Eaton <jwe@octave.org>
parents:
9113
diff
changeset
|
37 plot_stream = popen (sprintf ("%s ", prog, args{:}), "w"); |
9113
4bb94a71913b
__gnuplot_open_stream__.m: New function and its application.
Ben Abbott <bpabbott@mac.com>
parents:
diff
changeset
|
38 if (plot_stream < 0) |
11588
d5bd2766c640
style fixes for warning and error messages in script files
John W. Eaton <jwe@octave.org>
parents:
11587
diff
changeset
|
39 error ("__gnuplot_open_stream__: failed to open connection to gnuplot"); |
9113
4bb94a71913b
__gnuplot_open_stream__.m: New function and its application.
Ben Abbott <bpabbott@mac.com>
parents:
diff
changeset
|
40 endif |
4bb94a71913b
__gnuplot_open_stream__.m: New function and its application.
Ben Abbott <bpabbott@mac.com>
parents:
diff
changeset
|
41 endif |
4bb94a71913b
__gnuplot_open_stream__.m: New function and its application.
Ben Abbott <bpabbott@mac.com>
parents:
diff
changeset
|
42 if (nargin > 1) |
4bb94a71913b
__gnuplot_open_stream__.m: New function and its application.
Ben Abbott <bpabbott@mac.com>
parents:
diff
changeset
|
43 set (h, "__plot_stream__", plot_stream); |
4bb94a71913b
__gnuplot_open_stream__.m: New function and its application.
Ben Abbott <bpabbott@mac.com>
parents:
diff
changeset
|
44 endif |
4bb94a71913b
__gnuplot_open_stream__.m: New function and its application.
Ben Abbott <bpabbott@mac.com>
parents:
diff
changeset
|
45 endfunction |