# HG changeset patch # User David Bateman # Date 1272316464 -7200 # Node ID 384c514bbae22359f11378c23c069e94f88c94fe # Parent 3eba2cc7cbda587c2f76afca134c90275b22ba6a Allow setting of the markers in errorbar linestyles diff -r 3eba2cc7cbda -r 384c514bbae2 scripts/ChangeLog --- a/scripts/ChangeLog Mon Apr 26 22:26:17 2010 +0200 +++ b/scripts/ChangeLog Mon Apr 26 23:14:24 2010 +0200 @@ -6,7 +6,8 @@ * plot/private/__errplot__.m: Allow x, box and xy errorbars with different syntax. - * plot/private/__errplot__.m: Allow matlab style linestyles, + * plot/private/__errplot__.m: Allow matlab style linestyles, and + support setting the markers. 2010-04-24 David Bateman diff -r 3eba2cc7cbda -r 384c514bbae2 scripts/plot/private/__errplot__.m --- a/scripts/plot/private/__errplot__.m Mon Apr 26 22:26:17 2010 +0200 +++ b/scripts/plot/private/__errplot__.m Mon Apr 26 23:14:24 2010 +0200 @@ -56,20 +56,26 @@ ifmt = "matlab"; endif + if (! isempty (fmt.marker) && ! strcmp (fmt.marker, "none")) + mrk = fmt.marker; + else + mrk = "none"; + endif + hg = hggroup ("parent", p); h = [h; hg]; args = __add_datasource__ ("__errplot__", hg, {"x", "y", "l", "u", "xl", "xu"}); if (isempty (fmt.color)) - hl = __line__ (hg, "color", __next_line_color__ ()); + hl = __line__ (hg, "color", __next_line_color__ (), "marker", mrk); else - hl = __line__ (hg, "color", fmt.color); + hl = __line__ (hg, "color", fmt.color, "marker", mrk); endif if (index (ifmt, "matlab")) ifmt = "yerr"; - if (! strcmp (fmt.linestyle, "none")) + if (! isempty (fmt.linestyle) && ! strcmp (fmt.linestyle, "none")) set (hl, "linestyle", fmt.linestyle); endif endif @@ -165,7 +171,7 @@ "color", get (hl, "color"), "linewidth", get (hl, "linewidth"), "linestyle", get (hl, "linestyle"), - "marker", "none", "parent", hg); + "marker", mrk, "parent", hg); endfor endfunction