Mercurial > hg > octave-lyh
changeset 6736:751f340d486c
[project @ 2007-06-15 21:31:38 by jwe]
author | jwe |
---|---|
date | Fri, 15 Jun 2007 21:31:39 +0000 |
parents | 19e2d70e2a4c |
children | 7888712d3532 |
files | scripts/ChangeLog scripts/plot/__errplot__.m scripts/plot/__go_draw_axes__.m scripts/plot/__pltopt1__.m |
diffstat | 4 files changed, 43 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,11 @@ +2007-06-15 Pete Gustafson <petegus@umich.edu> + + * plot/__errplot__.m: Set ifmt from fmt.linestyle. + * plot/__go_draw_axes__.m: Removed undefined tx from call to + get_data_limits. + * plot/__plotopt1__.m: Intercept and strip format string when + called by __errplot__. + 2007-06-15 John W. Eaton <jwe@octave.org> * testfun/test.m: Also return number of expected failures.
--- a/scripts/plot/__errplot__.m +++ b/scripts/plot/__errplot__.m @@ -44,8 +44,25 @@ [len, nplots] = size (a1); for i = 1:nplots - ifmt = fmt{1+mod(i-1,numel(fmt))}; + ## Set the plot type based on linestyle. + if (fmt.linestyle == "~") + ifmt = "yerr"; + elseif (fmt.linestyle == ">") + ifmt = "xerr"; + elseif (fmt.linestyle == "~>") + ifmt = "xyerr"; + elseif (fmt.linestyle == "#") + ifmt = "box"; + elseif (fmt.linestyle == "#~") + ifmt = "boxy"; + elseif (fmt.linestyle == "#~>") + ifmt = "boxxy"; + else + print_usage (); + endif + h = __line__ (p); + switch (nargin - 2) case 2 set (h, "xdata", (1:len)');
--- a/scripts/plot/__go_draw_axes__.m +++ b/scripts/plot/__go_draw_axes__.m @@ -401,9 +401,10 @@ withclause{data_idx} = sprintf ("with xyerrorbars linestyle %d", data_idx); else + ## Obtain the limits based on the exact x values. if (xautoscale) [xmin, xmax, xminp] = get_data_limits (xmin, xmax, - xminp, xdat, tx); + xminp, xdat); endif data{data_idx} = [xdat, ydat, ylo, yhi]'; usingclause{data_idx} = "using ($1):($2):($3):($4)";
--- a/scripts/plot/__pltopt1__.m +++ b/scripts/plot/__pltopt1__.m @@ -45,6 +45,21 @@ have_linestyle = false; have_marker = false; + ## If called by __errplot__, extract the linestyle before proceeding. + if (strcmp (caller,"__errplot__")) + if (strncmp (opt, "#~>", 3)) + n = 3; + elseif (strncmp (opt, "#~", 2) || strncmp (opt, "~>", 2)) + n = 2; + elseif (strncmp (opt, "~", 1) || strncmp (opt, ">", 1) + || strncmp (opt, "#", 1)) + n = 1; + endif + options.linestyle = opt(1:n); + opt(1:n) = []; + have_linestyle = true; + endif + while (! isempty (opt)) if (strncmp (opt, "--", 2) || strncmp (opt, "-.", 2)) options.linestyle = opt(1:2);