Mercurial > hg > octave-nkf
annotate scripts/plot/semilogyerr.m @ 16908:1c4be5dcacd5
Add demos to legend.m using subplots.
scripts/plot/legend.m: Add demos using subplots.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Sat, 06 Jul 2013 11:54:31 -0400 |
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:
14245
diff
changeset
|
20 ## @deftypefn {Function File} {} semilogyerr (@var{args}) |
64e7bb01fce2
doc: Improve documentation for 2-D plot functions
Rik <rik@octave.org>
parents:
14245
diff
changeset
|
21 ## @deftypefnx {Function File} {@var{h} =} semilogyerr (@var{args}) |
10687
a8ce6bdecce5
Improve documentation strings.
Rik <octave@nomad.inbox5.com>
parents:
10595
diff
changeset
|
22 ## Produce two-dimensional plots using a logarithmic scale for the @var{y} |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
23 ## axis and errorbars at each data point. Many different combinations of |
16814
64e7bb01fce2
doc: Improve documentation for 2-D plot functions
Rik <rik@octave.org>
parents:
14245
diff
changeset
|
24 ## arguments are possible. The most common form is |
4019 | 25 ## |
26 ## @example | |
27 ## semilogyerr (@var{x}, @var{y}, @var{ey}, @var{fmt}) | |
28 ## @end example | |
29 ## | |
30 ## @noindent | |
10687
a8ce6bdecce5
Improve documentation strings.
Rik <octave@nomad.inbox5.com>
parents:
10595
diff
changeset
|
31 ## which produces a semi-logarithmic 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 @code{errorbar} for available formats and |
4019 | 34 ## additional information. |
12448
f2c080bbd8a5
Fix documentation bugs uncovered while rewriting munge-texi.
Rik <octave@nomad.inbox5.com>
parents:
11587
diff
changeset
|
35 ## @seealso{errorbar, loglogerr, semilogxerr} |
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 = semilogyerr (varargin) |
4019 | 43 |
7207 | 44 [h, varargin] = __plt_get_axis_arg__ ("semilogyerr", varargin{:}); |
7216 | 45 |
7207 | 46 oldh = gca (); |
47 unwind_protect | |
48 axes (h); | |
49 newplot (); | |
4019 | 50 |
7207 | 51 set (h, "yscale", "log"); |
4019 | 52 |
7207 | 53 tmp = __errcomm__ ("semilogyerr", 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:
7216
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:
7216
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; |
10595
46c8ecc4d565
Add demos to loglogerr.m, semilogxerr.m, & semilogyerr.m
Ben Abbott <bpabbott@mac.com>
parents:
7216
diff
changeset
|
67 %! x = 0.25:0.25:10; |
46c8ecc4d565
Add demos to loglogerr.m, semilogxerr.m, & semilogyerr.m
Ben Abbott <bpabbott@mac.com>
parents:
7216
diff
changeset
|
68 %! y = wblpdf (x, 4, 2); |
46c8ecc4d565
Add demos to loglogerr.m, semilogxerr.m, & semilogyerr.m
Ben Abbott <bpabbott@mac.com>
parents:
7216
diff
changeset
|
69 %! eyu = rand (size (y)); |
46c8ecc4d565
Add demos to loglogerr.m, semilogxerr.m, & semilogyerr.m
Ben Abbott <bpabbott@mac.com>
parents:
7216
diff
changeset
|
70 %! eyl = 1.0 - 1./(1+eyu); |
14245
4506eade9f04
Use Matlab coding conventions for demos in plot/ directory.
Rik <octave@nomad.inbox5.com>
parents:
14237
diff
changeset
|
71 %! semilogyerr (x, y, eyl.*y, eyu.*y, '~-d'); |
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 ([0 10]); |
10595
46c8ecc4d565
Add demos to loglogerr.m, semilogxerr.m, & semilogyerr.m
Ben Abbott <bpabbott@mac.com>
parents:
7216
diff
changeset
|
73 |