Mercurial > octave
changeset 29100:014d2710dcd5
__pltopt__.m: Remove ancient code supporting numeric values for colors in LineSpec.
* __pltopt__.m: Remove support for marker '@'. Remove numeric support for
colors in LineSpec. Both of these are undocumented and have not been
supported in Matlab for years. Rewrite BIST test not to test for this
feature.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 26 Nov 2020 07:53:09 -0800 |
parents | 960099d8a691 |
children | b1d1e47092a6 |
files | scripts/plot/util/__pltopt__.m |
diffstat | 1 files changed, 9 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/util/__pltopt__.m Thu Nov 26 13:36:59 2020 +0100 +++ b/scripts/plot/util/__pltopt__.m Thu Nov 26 07:53:09 2020 -0800 @@ -169,27 +169,23 @@ n = 9; endif endif - ## Backward compatibility. Leave undocumented. - if (topt == "@") - topt = "+"; - endif options.marker = topt; - ## Numeric color specs are for backward compatibility. Don't document. - elseif (topt == "k" || topt == "0") + ## Color specs + elseif (topt == "k") options.color = [0, 0, 0]; - elseif (topt == "r" || topt == "1") + elseif (topt == "r") options.color = [1, 0, 0]; - elseif (topt == "g" || topt == "2") + elseif (topt == "g") options.color = [0, 1, 0]; - elseif (topt == "b" || topt == "3") + elseif (topt == "b") options.color = [0, 0, 1]; elseif (topt == "y") options.color = [1, 1, 0]; - elseif (topt == "m" || topt == "4") + elseif (topt == "m") options.color = [1, 0, 1]; - elseif (topt == "c" || topt == "5") + elseif (topt == "c") options.color = [0, 1, 1]; - elseif (topt == "w" || topt == "6") + elseif (topt == "w") options.color = [1, 1, 1]; elseif (isspace (topt)) ## Do nothing. @@ -244,7 +240,7 @@ %! assert (opts.linestyle, ":"); %! assert (opts.marker, "x"); %!test -%! opts = __pltopt__ ("abc", "2square"); +%! opts = __pltopt__ ("abc", "gsquare"); %! assert (opts.color, [0 1 0]); %! assert (opts.linestyle, "none"); %! assert (opts.marker, "s");