# HG changeset patch # User Rik # Date 1380666620 25200 # Node ID ec5bd610a11fd55c5b77ad36b7bbca52a8e47119 # Parent 1da32463b540c1b61019b29a73577d33e354895b 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. diff -r 1da32463b540 -r ec5bd610a11f libinterp/corefcn/graphics.in.h --- 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 diff -r 1da32463b540 -r ec5bd610a11f scripts/plot/private/__pltopt__.m --- 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")