Mercurial > hg > octave-nkf
annotate scripts/plot/loglogerr.m @ 15137:16a6b0a6855d gui
GUI: support for octave arguments and integrate with run-octave.
* src/octave.h (octave_initialize_interpreter, octave_execute_interpreter):
New functions.
(octave_cmdline_argc, octave_cmdline_argv, octave_embedded): New variables.
* src/octave.cc (octave_cmdline_argc, octave_cmdline_argv, octave_embedded):
New variables.
(octave_initialize_interpreter, octave_execute_interpreter): New functions.
(octave_main): Rewrite using them.
* run-octave.in (octave_executable): New variable.
(-gui): New option flag.
* gui/src/octave-adapter/octave-main-thread.cc (octave_main_thread::run):
Use octave_execute_interpreter.
* gui/src/octave-gui.cc (dissociate_terminal): New function.
(main): Use it. Also use octave_initialize_interpreter.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 05 Aug 2012 16:15:58 -0400 |
parents | f3d52523cde1 |
children | 64e7bb01fce2 |
rev | line source |
---|---|
14138
72c96de7a403
maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents:
14092
diff
changeset
|
1 ## Copyright (C) 2000-2012 Teemu Ikonen |
4019 | 2 ## |
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 | |
7016 | 7 ## the Free Software Foundation; either version 3 of the License, or (at |
8 ## your option) any later version. | |
4019 | 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 ## | |
15 ## You should have received a copy of the GNU General Public License | |
7016 | 16 ## along with Octave; see the file COPYING. If not, see |
17 ## <http://www.gnu.org/licenses/>. | |
4019 | 18 |
19 ## -*- texinfo -*- | |
20 ## @deftypefn {Function File} {} loglogerr (@var{args}) | |
6895 | 21 ## Produce two-dimensional plots on double logarithm axis with |
22 ## errorbars. Many different combinations of arguments are possible. | |
4019 | 23 ## The most used form is |
24 ## | |
25 ## @example | |
26 ## loglogerr (@var{x}, @var{y}, @var{ey}, @var{fmt}) | |
27 ## @end example | |
28 ## | |
29 ## @noindent | |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
30 ## which produces a double logarithm plot of @var{y} versus @var{x} |
4019 | 31 ## with errors in the @var{y}-scale defined by @var{ey} and the plot |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
32 ## format defined by @var{fmt}. See errorbar for available formats and |
4019 | 33 ## additional information. |
6895 | 34 ## @seealso{errorbar, semilogxerr, semilogyerr} |
4019 | 35 ## @end deftypefn |
36 | |
37 ## Created: 20.2.2001 | |
38 ## Author: Teemu Ikonen <tpikonen@pcu.helsinki.fi> | |
39 ## Keywords: errorbar, plotting | |
40 | |
6302 | 41 function retval = loglogerr (varargin) |
4019 | 42 |
7207 | 43 [h, varargin] = __plt_get_axis_arg__ ("loglogerr", varargin{:}); |
7216 | 44 |
7207 | 45 oldh = gca (); |
46 unwind_protect | |
47 axes (h); | |
48 newplot (); | |
4019 | 49 |
7207 | 50 set (h, "xscale", "log", "yscale", "log"); |
4019 | 51 |
7207 | 52 tmp = __errcomm__ ("loglogerr", h, varargin{:}); |
6302 | 53 |
7207 | 54 if (nargout > 0) |
55 retval = tmp; | |
56 endif | |
57 unwind_protect_cleanup | |
58 axes (oldh); | |
59 end_unwind_protect | |
4019 | 60 |
61 endfunction | |
10595
46c8ecc4d565
Add demos to loglogerr.m, semilogxerr.m, & semilogyerr.m
Ben Abbott <bpabbott@mac.com>
parents:
9245
diff
changeset
|
62 |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
63 |
10595
46c8ecc4d565
Add demos to loglogerr.m, semilogxerr.m, & semilogyerr.m
Ben Abbott <bpabbott@mac.com>
parents:
9245
diff
changeset
|
64 %!demo |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
65 %! clf; |
14363
f3d52523cde1
Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents:
14245
diff
changeset
|
66 %! x = exp (log (0.01):0.2:log (10)); |
10595
46c8ecc4d565
Add demos to loglogerr.m, semilogxerr.m, & semilogyerr.m
Ben Abbott <bpabbott@mac.com>
parents:
9245
diff
changeset
|
67 %! y = wblpdf (x, 3, 2); |
46c8ecc4d565
Add demos to loglogerr.m, semilogxerr.m, & semilogyerr.m
Ben Abbott <bpabbott@mac.com>
parents:
9245
diff
changeset
|
68 %! eyu = 2*rand (size (y)) .* y; |
46c8ecc4d565
Add demos to loglogerr.m, semilogxerr.m, & semilogyerr.m
Ben Abbott <bpabbott@mac.com>
parents:
9245
diff
changeset
|
69 %! eyl = 0.5*rand (size (y)) .* y; |
14245
4506eade9f04
Use Matlab coding conventions for demos in plot/ directory.
Rik <octave@nomad.inbox5.com>
parents:
14237
diff
changeset
|
70 %! loglogerr (x, y, eyl, eyu, '#~x-'); |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
71 %! xlim (x([1, end])); |
10595
46c8ecc4d565
Add demos to loglogerr.m, semilogxerr.m, & semilogyerr.m
Ben Abbott <bpabbott@mac.com>
parents:
9245
diff
changeset
|
72 |