# HG changeset patch # User Rik # Date 1606405989 28800 # Node ID 014d2710dcd5858c7bdc16cc14c1a84fdd96e13b # Parent 960099d8a6917a4c27b86432624d43df02b2bbf8 __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. diff -r 960099d8a691 -r 014d2710dcd5 scripts/plot/util/__pltopt__.m --- 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");