Mercurial > octave
comparison scripts/statistics/base/qqplot.m @ 18424:cb377af34c00
qqplot.m: Plot points as well as connecting line.
* qqplot.m: Plot points as well as connecting line.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 02 Feb 2014 22:21:45 -0800 |
parents | d63878346099 |
children | 0e1f5a750d00 |
comparison
equal
deleted
inserted
replaced
18423:1597281144e4 | 18424:cb377af34c00 |
---|---|
60 | 60 |
61 if (nargin < 1) | 61 if (nargin < 1) |
62 print_usage (); | 62 print_usage (); |
63 endif | 63 endif |
64 | 64 |
65 if (!(isnumeric (x) && isvector (x))) | 65 if (! (isnumeric (x) && isvector (x))) |
66 error ("qqplot: X must be a numeric vector"); | 66 error ("qqplot: X must be a numeric vector"); |
67 endif | 67 endif |
68 | 68 |
69 if (nargin == 1) | 69 if (nargin == 1) |
70 f = @stdnormal_inv; | 70 f = @stdnormal_inv; |
95 q_label = [q_label param_str]; | 95 q_label = [q_label param_str]; |
96 endif | 96 endif |
97 endif | 97 endif |
98 | 98 |
99 if (nargout == 0) | 99 if (nargout == 0) |
100 plot (q, s); | 100 plot (q, s, "-x"); |
101 q_label = strrep (q_label, '_inv', '\_inv'); | 101 q_label = strrep (q_label, '_inv', '\_inv'); |
102 if (q_label(1) == '@') | 102 if (q_label(1) == '@') |
103 q_label = q_label(6:end); # Strip "@(y) " from anon. function | 103 q_label = q_label(6:end); # Strip "@(y) " from anon. function |
104 endif | 104 endif |
105 xlabel (q_label); | 105 xlabel (q_label); |
109 sout = s; | 109 sout = s; |
110 endif | 110 endif |
111 | 111 |
112 endfunction | 112 endfunction |
113 | 113 |
114 |