Mercurial > hg > octave-lyh
diff scripts/plot/__pltopt1__.m @ 6395:a8dd70bacc1e
[project @ 2007-03-07 22:22:12 by jwe]
author | jwe |
---|---|
date | Wed, 07 Mar 2007 22:24:22 +0000 |
parents | cc2bee854d23 |
children | 1896d9b1f302 |
line wrap: on
line diff
--- a/scripts/plot/__pltopt1__.m +++ b/scripts/plot/__pltopt1__.m @@ -41,6 +41,9 @@ return; endif + have_linestyle = false; + have_marker = false; + while (! isempty (opt)) if (strncmp (opt, "--", 2) || strncmp (opt, "-.", 2)) options.linestyle = opt(1:2); @@ -49,12 +52,14 @@ topt = opt(1); n = 1; if (topt == "-" || topt == ":") + have_linestyle = true; options.linestyle = topt; elseif (topt == "+" || topt == "o" || topt == "*" || topt == "." || topt == "x" || topt == "s" || topt == "d" || topt == "^" || topt == "v" || topt == ">" || topt == "<" || topt == "p" || topt == "h") + have_marker = true; options.marker = topt; elseif (topt == "k") options.color = [0, 0, 0]; @@ -89,4 +94,8 @@ opt(1:n) = []; endwhile + if (have_marker && ! have_linestyle) + options.linestyle = ""; + endif + endfunction