annotate scripts/plot/semilogxerr.m @ 16580:adc150db1809

style fixes for uigetfile changes * dialog.cc, dialog.h, main-window.cc, octave-qt-link.cc, octave-qt-link.h, octave-link.cc, octave-link.h, uigetfile.m: Style fixes.
author John W. Eaton <jwe@octave.org>
date Sun, 28 Apr 2013 13:41:37 -0400
parents f3d52523cde1
children 64e7bb01fce2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
2 ##
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
3 ## This file is part of Octave.
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
4 ##
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
6 ## under the terms of the GNU General Public License as published by
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6895
diff changeset
7 ## the Free Software Foundation; either version 3 of the License, or (at
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6895
diff changeset
8 ## your option) any later version.
4019
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
9 ##
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
10 ## Octave is distributed in the hope that it will be useful, but
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
13 ## General Public License for more details.
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
14 ##
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
15 ## You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6895
diff changeset
16 ## along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6895
diff changeset
17 ## <http://www.gnu.org/licenses/>.
4019
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
18
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
19 ## -*- texinfo -*-
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
20 ## @deftypefn {Function File} {} semilogxerr (@var{args})
10687
a8ce6bdecce5 Improve documentation strings.
Rik <octave@nomad.inbox5.com>
parents: 10595
diff changeset
21 ## Produce two-dimensional plots using a logarithmic scale for the @var{x}
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
22 ## axis and errorbars at each data point. Many different combinations of
10687
a8ce6bdecce5 Improve documentation strings.
Rik <octave@nomad.inbox5.com>
parents: 10595
diff changeset
23 ## arguments are possible. The most used form is
4019
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
24 ##
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
25 ## @example
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
26 ## semilogxerr (@var{x}, @var{y}, @var{ey}, @var{fmt})
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
27 ## @end example
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
28 ##
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
29 ## @noindent
10687
a8ce6bdecce5 Improve documentation strings.
Rik <octave@nomad.inbox5.com>
parents: 10595
diff changeset
30 ## which produces a semi-logarithmic plot of @var{y} versus @var{x}
4019
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
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 @code{errorbar} for available formats and
4019
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
33 ## additional information.
12448
f2c080bbd8a5 Fix documentation bugs uncovered while rewriting munge-texi.
Rik <octave@nomad.inbox5.com>
parents: 11587
diff changeset
34 ## @seealso{errorbar, loglogerr, semilogyerr}
4019
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
35 ## @end deftypefn
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
36
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
37 ## Created: 20.2.2001
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
38 ## Author: Teemu Ikonen <tpikonen@pcu.helsinki.fi>
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
39 ## Keywords: errorbar, plotting
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
40
6302
a5cd8b77e892 [project @ 2007-02-13 08:08:33 by jwe]
jwe
parents: 6257
diff changeset
41 function retval = semilogxerr (varargin)
4019
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
42
7207
71c03c7239fb [project @ 2007-11-28 02:19:25 by jwe]
jwe
parents: 7017
diff changeset
43 [h, varargin] = __plt_get_axis_arg__ ("semilogxerr", varargin{:});
7216
5389a52df87b [project @ 2007-11-29 19:07:29 by jwe]
jwe
parents: 7207
diff changeset
44
7207
71c03c7239fb [project @ 2007-11-28 02:19:25 by jwe]
jwe
parents: 7017
diff changeset
45 oldh = gca ();
71c03c7239fb [project @ 2007-11-28 02:19:25 by jwe]
jwe
parents: 7017
diff changeset
46 unwind_protect
71c03c7239fb [project @ 2007-11-28 02:19:25 by jwe]
jwe
parents: 7017
diff changeset
47 axes (h);
71c03c7239fb [project @ 2007-11-28 02:19:25 by jwe]
jwe
parents: 7017
diff changeset
48 newplot ();
4019
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
49
7207
71c03c7239fb [project @ 2007-11-28 02:19:25 by jwe]
jwe
parents: 7017
diff changeset
50 set (h, "xscale", "log");
4019
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
51
7207
71c03c7239fb [project @ 2007-11-28 02:19:25 by jwe]
jwe
parents: 7017
diff changeset
52 tmp = __errcomm__ ("semilogxerr", h, varargin{:});
6302
a5cd8b77e892 [project @ 2007-02-13 08:08:33 by jwe]
jwe
parents: 6257
diff changeset
53
7207
71c03c7239fb [project @ 2007-11-28 02:19:25 by jwe]
jwe
parents: 7017
diff changeset
54 if (nargout > 0)
71c03c7239fb [project @ 2007-11-28 02:19:25 by jwe]
jwe
parents: 7017
diff changeset
55 retval = tmp;
71c03c7239fb [project @ 2007-11-28 02:19:25 by jwe]
jwe
parents: 7017
diff changeset
56 endif
71c03c7239fb [project @ 2007-11-28 02:19:25 by jwe]
jwe
parents: 7017
diff changeset
57 unwind_protect_cleanup
71c03c7239fb [project @ 2007-11-28 02:19:25 by jwe]
jwe
parents: 7017
diff changeset
58 axes (oldh);
71c03c7239fb [project @ 2007-11-28 02:19:25 by jwe]
jwe
parents: 7017
diff changeset
59 end_unwind_protect
4019
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
60
c6d7ae9fcdb9 [project @ 2002-08-05 16:42:36 by jwe]
jwe
parents:
diff changeset
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, 2, 2);
46c8ecc4d565 Add demos to loglogerr.m, semilogxerr.m, & semilogyerr.m
Ben Abbott <bpabbott@mac.com>
parents: 9245
diff changeset
68 %! ey = 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
69 %! semilogxerr (x, y, ey, '#~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
70 %! xlim (x([1, end]));
11949c9795a0 Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
71