changeset 17529:ec5bd610a11f

Add support for long form marker styles such as "square", "diamond", etc. * libinterp/corefcn/graphics.in.h: Add "square", "diamond", "hexagram", "pentagram" to marker radio possibilities list. * HG: changed scripts/plot/private/__pltopt__.m: Correctly decode "square", "diamond", "hexagram", "pentagram" markers in linestyle spec.
author Rik <rik@octave.org>
date Tue, 01 Oct 2013 15:30:20 -0700
parents 1da32463b540
children 0f45d9dd8107
files libinterp/corefcn/graphics.in.h scripts/plot/private/__pltopt__.m
diffstat 2 files changed, 18 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.in.h	Tue Oct 01 14:22:42 2013 -0700
+++ b/libinterp/corefcn/graphics.in.h	Tue Oct 01 15:30:20 2013 -0700
@@ -4278,7 +4278,7 @@
       radio_property interpreter , "{tex}|none|latex"
       radio_property linestyle , "{-}|--|:|-.|none"
       double_property linewidth , 0.5
-      radio_property marker , "{none}|+|o|*|.|x|s|d|^|v|>|<|p|h"
+      radio_property marker , "{none}|+|o|*|.|x|s|square|d|diamond|^|v|>|<|p|pentagram|h|hexagram"
       color_property markeredgecolor , "{auto}|none"
       color_property markerfacecolor , "auto|{none}"
       double_property markersize , 6
@@ -4688,7 +4688,8 @@
       radio_property interpreter , "{tex}|none|latex"
       radio_property linestyle , "{-}|--|:|-.|none"
       double_property linewidth , 0.5
-      radio_property marker , "{none}|+|o|*|.|x|s|d|^|v|>|<|p|h"
+      radio_property marker , "{none}|+|o|*|.|x|s|square|d|diamond|^|v|>|<|p|pentagram|h|hexagram"
+      //radio_property marker , "{none}|+|o|*|.|x|s|d|^|v|>|<|p|h"
       color_property markeredgecolor , "none|{auto}|flat"
       color_property markerfacecolor , "{none}|auto|flat"
       double_property markersize , 6
@@ -4809,7 +4810,8 @@
       radio_property interpreter , "{tex}|none|latex"
       radio_property linestyle , "{-}|--|:|-.|none"
       double_property linewidth , 0.5
-      radio_property marker , "{none}|+|o|*|.|x|s|d|^|v|>|<|p|h"
+      radio_property marker , "{none}|+|o|*|.|x|s|square|d|diamond|^|v|>|<|p|pentagram|h|hexagram"
+      //radio_property marker , "{none}|+|o|*|.|x|s|d|^|v|>|<|p|h"
       color_property markeredgecolor , "none|{auto}|flat"
       color_property markerfacecolor , "{none}|auto|flat"
       double_property markersize , 6
--- a/scripts/plot/private/__pltopt__.m	Tue Oct 01 14:22:42 2013 -0700
+++ b/scripts/plot/private/__pltopt__.m	Tue Oct 01 15:30:20 2013 -0700
@@ -160,12 +160,24 @@
               || topt == ">" || topt == "<" || topt == "p"
               || topt == "h" || topt == "@")
         have_marker = true;
+        ## Check for long form marker styles
+        if (any (topt == "sdhp"))
+          if (strncmp (opt, "square", 6))
+            n = 6;
+          elseif (strncmp (opt, "diamond", 7))
+            n = 7;
+          elseif (strncmp (opt, "hexagram", 8))
+            n = 8;
+          elseif (strncmp (opt, "pentagram", 9))
+            n = 9;
+          endif
+        endif
         ## Backward compatibility.  Leave undocumented.
         if (topt == "@")
           topt = "+";
         endif
         options.marker = topt;
-      ## Numeric color specs for backward compatibility.  Leave undocumented.
+      ## Numeric color specs are for backward compatibility.  Don't document.
       elseif (topt == "k" || topt == "0")
         options.color = [0, 0, 0];
       elseif (topt == "r" || topt == "1")