Mercurial > hg > octave-lyh
changeset 10576:384c514bbae2
Allow setting of the markers in errorbar linestyles
author | David Bateman <dbateman@free.fr> |
---|---|
date | Mon, 26 Apr 2010 23:14:24 +0200 |
parents | 3eba2cc7cbda |
children | 87f879cf48fd |
files | scripts/ChangeLog scripts/plot/private/__errplot__.m |
diffstat | 2 files changed, 12 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -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 <dbateman@free.fr>
--- a/scripts/plot/private/__errplot__.m +++ b/scripts/plot/private/__errplot__.m @@ -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