changeset 31034:399925c27b7c stable

Backout changeset 014d2710dcd5 (bug #62470).
author Markus Mützel <markus.muetzel@gmx.de>
date Fri, 27 May 2022 14:46:29 +0200
parents 0938366560cf
children 7c4e580bc103
files scripts/plot/util/__pltopt__.m
diffstat 1 files changed, 12 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/util/__pltopt__.m	Thu May 26 19:30:35 2022 +0200
+++ b/scripts/plot/util/__pltopt__.m	Fri May 27 14:46:29 2022 +0200
@@ -181,21 +181,25 @@
           n = 9;
         endif
       endif
+        ## Backward compatibility.  Leave undocumented.
+        if (topt == "@")
+          topt = "+";
+        endif
       options.marker = topt;
-    ## Color specs
-    elseif (topt == "k")
+    ## Numeric color specs are for backward compatibility.  Don't document.
+    elseif (topt == "k" || topt == "0")
       options.color = [0, 0, 0];
-    elseif (topt == "r")
+    elseif (topt == "r" || topt == "1")
       if (strncmp (opt, "red", 3))
         n = 3;
       endif
       options.color = [1, 0, 0];
-    elseif (topt == "g")
+    elseif (topt == "g" || topt == "2")
       if (strncmp (opt, "green", 5))
         n = 5;
       endif
       options.color = [0, 1, 0];
-    elseif (topt == "b")
+    elseif (topt == "b" || topt == "3")
       if (strncmp (opt, "black", 5))
         options.color = [0, 0, 0];
         n = 5;
@@ -210,17 +214,17 @@
         n = 6;
       endif
       options.color = [1, 1, 0];
-    elseif (topt == "m")
+    elseif (topt == "m" || topt == "4")
       if (strncmp (opt, "magenta", 7))
         n = 7;
       endif
       options.color = [1, 0, 1];
-    elseif (topt == "c")
+    elseif (topt == "c" || topt == "5")
       if (strncmp (opt, "cyan", 4))
         n = 4;
       endif
       options.color = [0, 1, 1];
-    elseif (topt == "w")
+    elseif (topt == "w" || topt == "6")
       if (strncmp (opt, "white", 5))
         n = 5;
       endif