Mercurial > hg > octave-nkf
annotate scripts/plot/loglogerr.m @ 17049:0322e057697f
hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
* scripts/plot/box.m: Update to use new __plt_get_axis_arg__.
Use hax instead of ax. Redo docstring.
* scripts/plot/grid.m: Update to use new __plt_get_axis_arg__.
Use hax instead of ax. Redo docstring. Move input validation
to front of function.
* scripts/plot/hold.m: Update to use new __plt_get_axis_arg__.
Use hax instead of ax. Redo docstring. Add 2 new %!demos.
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Tue, 23 Jul 2013 15:10:57 +0200 |
parents | 64e7bb01fce2 |
children | abf6a6147f1a |
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 -*- | |
16814
64e7bb01fce2
doc: Improve documentation for 2-D plot functions
Rik <rik@octave.org>
parents:
14363
diff
changeset
|
20 ## @deftypefn {Function File} {} loglogerr (@var{args}) |
64e7bb01fce2
doc: Improve documentation for 2-D plot functions
Rik <rik@octave.org>
parents:
14363
diff
changeset
|
21 ## @deftypefnx {Function File} {@var{h} =} loglogerr (@var{args}) |
6895 | 22 ## Produce two-dimensional plots on double logarithm axis with |
23 ## errorbars. Many different combinations of arguments are possible. | |
16814
64e7bb01fce2
doc: Improve documentation for 2-D plot functions
Rik <rik@octave.org>
parents:
14363
diff
changeset
|
24 ## The most common form is |
4019 | 25 ## |
26 ## @example | |
27 ## loglogerr (@var{x}, @var{y}, @var{ey}, @var{fmt}) | |
28 ## @end example | |
29 ## | |
30 ## @noindent | |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
31 ## which produces a double logarithm plot of @var{y} versus @var{x} |
4019 | 32 ## 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
|
33 ## format defined by @var{fmt}. See errorbar for available formats and |
4019 | 34 ## additional information. |
6895 | 35 ## @seealso{errorbar, semilogxerr, semilogyerr} |
4019 | 36 ## @end deftypefn |
37 | |
38 ## Created: 20.2.2001 | |
39 ## Author: Teemu Ikonen <tpikonen@pcu.helsinki.fi> | |
40 ## Keywords: errorbar, plotting | |
41 | |
6302 | 42 function retval = loglogerr (varargin) |
4019 | 43 |
7207 | 44 [h, varargin] = __plt_get_axis_arg__ ("loglogerr", varargin{:}); |
7216 | 45 |
7207 | 46 oldh = gca (); |
47 unwind_protect | |
48 axes (h); | |
49 newplot (); | |
4019 | 50 |
7207 | 51 set (h, "xscale", "log", "yscale", "log"); |
4019 | 52 |
7207 | 53 tmp = __errcomm__ ("loglogerr", h, varargin{:}); |
6302 | 54 |
7207 | 55 if (nargout > 0) |
56 retval = tmp; | |
57 endif | |
58 unwind_protect_cleanup | |
59 axes (oldh); | |
60 end_unwind_protect | |
4019 | 61 |
62 endfunction | |
10595
46c8ecc4d565
Add demos to loglogerr.m, semilogxerr.m, & semilogyerr.m
Ben Abbott <bpabbott@mac.com>
parents:
9245
diff
changeset
|
63 |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
64 |
10595
46c8ecc4d565
Add demos to loglogerr.m, semilogxerr.m, & semilogyerr.m
Ben Abbott <bpabbott@mac.com>
parents:
9245
diff
changeset
|
65 %!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
|
66 %! clf; |
14363
f3d52523cde1
Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents:
14245
diff
changeset
|
67 %! 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
|
68 %! y = wblpdf (x, 3, 2); |
46c8ecc4d565
Add demos to loglogerr.m, semilogxerr.m, & semilogyerr.m
Ben Abbott <bpabbott@mac.com>
parents:
9245
diff
changeset
|
69 %! 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
|
70 %! 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
|
71 %! 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
|
72 %! xlim (x([1, end])); |
10595
46c8ecc4d565
Add demos to loglogerr.m, semilogxerr.m, & semilogyerr.m
Ben Abbott <bpabbott@mac.com>
parents:
9245
diff
changeset
|
73 |