Mercurial > hg > octave-lyh
annotate scripts/plot/semilogyerr.m @ 17204:bc20614022aa
build: Redo LLVM macros to disable JIT rather than stop build if headers not found.
* configure.ac: Move functionality for OCTAVE_LLVM_IR_DIR,
OCTAVE_LLVM_IRBUILDER_HEADER, OCTAVE_LLVM_DATALAYOUT_HEADER macros
from acinclude.m4 to configure.ac.
* m4/acinclude.m4: Delete OCTAVE_LLVM_IR_DIR, OCTAVE_LLVM_IRBUILDER_HEADER,
OCTAVE_LLVM_DATALAYOUT_HEADER macros. Eliminate unnecessary else clause of
OCTAVE_LLVM_FUNCTION_ADDATTRIBUTE_API, OCTAVE_LLVM_FUNCTION_ADDFNATTR_API,
OTAVE_LLVM_CALLINST_ADDATTRIBUTE_API macros.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 07 Aug 2013 12:03:31 -0700 |
parents | df4c4b7708a4 |
children | 87ba70043bfc |
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}) |
17126
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17082
diff
changeset
|
21 ## @deftypefnx {Function File} {} semilogyerr (@var{hax}, @var{args}) |
16814
64e7bb01fce2
doc: Improve documentation for 2-D plot functions
Rik <rik@octave.org>
parents:
14245
diff
changeset
|
22 ## @deftypefnx {Function File} {@var{h} =} semilogyerr (@var{args}) |
17126
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17082
diff
changeset
|
23 ## Produce 2-D plots using a logarithmic scale for the y-axis and |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17082
diff
changeset
|
24 ## errorbars at each data point. |
17057
abf6a6147f1a
loglogerr.m, semilogyerr.m, semilogxerr.m: Update to use new __plt_get_axis_arg__.
Rik <rik@octave.org>
parents:
16814
diff
changeset
|
25 ## |
abf6a6147f1a
loglogerr.m, semilogyerr.m, semilogxerr.m: Update to use new __plt_get_axis_arg__.
Rik <rik@octave.org>
parents:
16814
diff
changeset
|
26 ## Many different combinations of arguments are possible. The most common |
abf6a6147f1a
loglogerr.m, semilogyerr.m, semilogxerr.m: Update to use new __plt_get_axis_arg__.
Rik <rik@octave.org>
parents:
16814
diff
changeset
|
27 ## form is |
4019 | 28 ## |
29 ## @example | |
30 ## semilogyerr (@var{x}, @var{y}, @var{ey}, @var{fmt}) | |
31 ## @end example | |
32 ## | |
33 ## @noindent | |
10687
a8ce6bdecce5
Improve documentation strings.
Rik <octave@nomad.inbox5.com>
parents:
10595
diff
changeset
|
34 ## which produces a semi-logarithmic plot of @var{y} versus @var{x} |
4019 | 35 ## with errors in the @var{y}-scale defined by @var{ey} and the plot |
17126
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17082
diff
changeset
|
36 ## format defined by @var{fmt}. @xref{XREFerrorbar,,errorbar}, for available |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17082
diff
changeset
|
37 ## formats and additional information. |
17169
52931d71400f
doc: Document that first argument can be an axes handle for several plot functions.
Rik <rik@octave.org>
parents:
17130
diff
changeset
|
38 ## |
52931d71400f
doc: Document that first argument can be an axes handle for several plot functions.
Rik <rik@octave.org>
parents:
17130
diff
changeset
|
39 ## If the first argument @var{hax} is an axes handle, then plot into this axis, |
52931d71400f
doc: Document that first argument can be an axes handle for several plot functions.
Rik <rik@octave.org>
parents:
17130
diff
changeset
|
40 ## rather than the current axes returned by @code{gca}. |
52931d71400f
doc: Document that first argument can be an axes handle for several plot functions.
Rik <rik@octave.org>
parents:
17130
diff
changeset
|
41 ## |
17057
abf6a6147f1a
loglogerr.m, semilogyerr.m, semilogxerr.m: Update to use new __plt_get_axis_arg__.
Rik <rik@octave.org>
parents:
16814
diff
changeset
|
42 ## @seealso{errorbar, semilogxerr, loglogerr} |
4019 | 43 ## @end deftypefn |
44 | |
45 ## Created: 20.2.2001 | |
46 ## Author: Teemu Ikonen <tpikonen@pcu.helsinki.fi> | |
47 ## Keywords: errorbar, plotting | |
48 | |
17057
abf6a6147f1a
loglogerr.m, semilogyerr.m, semilogxerr.m: Update to use new __plt_get_axis_arg__.
Rik <rik@octave.org>
parents:
16814
diff
changeset
|
49 function h = semilogyerr (varargin) |
4019 | 50 |
17057
abf6a6147f1a
loglogerr.m, semilogyerr.m, semilogxerr.m: Update to use new __plt_get_axis_arg__.
Rik <rik@octave.org>
parents:
16814
diff
changeset
|
51 [hax, varargin] = __plt_get_axis_arg__ ("semilogyerr", varargin{:}); |
7216 | 52 |
17057
abf6a6147f1a
loglogerr.m, semilogyerr.m, semilogxerr.m: Update to use new __plt_get_axis_arg__.
Rik <rik@octave.org>
parents:
16814
diff
changeset
|
53 oldfig = ifelse (isempty (hax), [], get (0, "currentfigure")); |
7207 | 54 unwind_protect |
17057
abf6a6147f1a
loglogerr.m, semilogyerr.m, semilogxerr.m: Update to use new __plt_get_axis_arg__.
Rik <rik@octave.org>
parents:
16814
diff
changeset
|
55 hax = newplot (hax); |
4019 | 56 |
17057
abf6a6147f1a
loglogerr.m, semilogyerr.m, semilogxerr.m: Update to use new __plt_get_axis_arg__.
Rik <rik@octave.org>
parents:
16814
diff
changeset
|
57 set (hax, "yscale", "log"); |
17082
cb8543396024
Set minorticks for error bar plots with logarithmic axes.
Rik <rik@octave.org>
parents:
17057
diff
changeset
|
58 if (! ishold (hax)) |
cb8543396024
Set minorticks for error bar plots with logarithmic axes.
Rik <rik@octave.org>
parents:
17057
diff
changeset
|
59 set (hax, "yminortick", "on"); |
cb8543396024
Set minorticks for error bar plots with logarithmic axes.
Rik <rik@octave.org>
parents:
17057
diff
changeset
|
60 endif |
17130
26589abbc78d
Don't pass axis handle unnecessarily from high level to low level plot functions.
Rik <rik@octave.org>
parents:
17126
diff
changeset
|
61 |
17057
abf6a6147f1a
loglogerr.m, semilogyerr.m, semilogxerr.m: Update to use new __plt_get_axis_arg__.
Rik <rik@octave.org>
parents:
16814
diff
changeset
|
62 htmp = __errcomm__ ("semilogyerr", hax, varargin{:}); |
17082
cb8543396024
Set minorticks for error bar plots with logarithmic axes.
Rik <rik@octave.org>
parents:
17057
diff
changeset
|
63 |
17057
abf6a6147f1a
loglogerr.m, semilogyerr.m, semilogxerr.m: Update to use new __plt_get_axis_arg__.
Rik <rik@octave.org>
parents:
16814
diff
changeset
|
64 unwind_protect_cleanup |
abf6a6147f1a
loglogerr.m, semilogyerr.m, semilogxerr.m: Update to use new __plt_get_axis_arg__.
Rik <rik@octave.org>
parents:
16814
diff
changeset
|
65 if (! isempty (oldfig)) |
abf6a6147f1a
loglogerr.m, semilogyerr.m, semilogxerr.m: Update to use new __plt_get_axis_arg__.
Rik <rik@octave.org>
parents:
16814
diff
changeset
|
66 set (0, "currentfigure", oldfig); |
abf6a6147f1a
loglogerr.m, semilogyerr.m, semilogxerr.m: Update to use new __plt_get_axis_arg__.
Rik <rik@octave.org>
parents:
16814
diff
changeset
|
67 endif |
abf6a6147f1a
loglogerr.m, semilogyerr.m, semilogxerr.m: Update to use new __plt_get_axis_arg__.
Rik <rik@octave.org>
parents:
16814
diff
changeset
|
68 end_unwind_protect |
6302 | 69 |
17057
abf6a6147f1a
loglogerr.m, semilogyerr.m, semilogxerr.m: Update to use new __plt_get_axis_arg__.
Rik <rik@octave.org>
parents:
16814
diff
changeset
|
70 if (nargout > 0) |
abf6a6147f1a
loglogerr.m, semilogyerr.m, semilogxerr.m: Update to use new __plt_get_axis_arg__.
Rik <rik@octave.org>
parents:
16814
diff
changeset
|
71 h = htmp; |
abf6a6147f1a
loglogerr.m, semilogyerr.m, semilogxerr.m: Update to use new __plt_get_axis_arg__.
Rik <rik@octave.org>
parents:
16814
diff
changeset
|
72 endif |
4019 | 73 |
74 endfunction | |
10595
46c8ecc4d565
Add demos to loglogerr.m, semilogxerr.m, & semilogyerr.m
Ben Abbott <bpabbott@mac.com>
parents:
7216
diff
changeset
|
75 |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
76 |
10595
46c8ecc4d565
Add demos to loglogerr.m, semilogxerr.m, & semilogyerr.m
Ben Abbott <bpabbott@mac.com>
parents:
7216
diff
changeset
|
77 %!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
|
78 %! clf; |
10595
46c8ecc4d565
Add demos to loglogerr.m, semilogxerr.m, & semilogyerr.m
Ben Abbott <bpabbott@mac.com>
parents:
7216
diff
changeset
|
79 %! 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
|
80 %! y = wblpdf (x, 4, 2); |
46c8ecc4d565
Add demos to loglogerr.m, semilogxerr.m, & semilogyerr.m
Ben Abbott <bpabbott@mac.com>
parents:
7216
diff
changeset
|
81 %! eyu = rand (size (y)); |
46c8ecc4d565
Add demos to loglogerr.m, semilogxerr.m, & semilogyerr.m
Ben Abbott <bpabbott@mac.com>
parents:
7216
diff
changeset
|
82 %! 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
|
83 %! 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
|
84 %! xlim ([0 10]); |
17198
df4c4b7708a4
Add titles and clean-up plotting %!demos.
Rik <rik@octave.org>
parents:
17169
diff
changeset
|
85 %! title ({'semilogyerr(): semilogy() plot with errorbars', ... |
df4c4b7708a4
Add titles and clean-up plotting %!demos.
Rik <rik@octave.org>
parents:
17169
diff
changeset
|
86 %! 'Y-axis is logarithmic'}); |
10595
46c8ecc4d565
Add demos to loglogerr.m, semilogxerr.m, & semilogyerr.m
Ben Abbott <bpabbott@mac.com>
parents:
7216
diff
changeset
|
87 |