Mercurial > hg > octave-avbm
changeset 10575:3eba2cc7cbda
Allow matlab style linestyles in errorbar plots
author | David Bateman <dbateman@free.fr> |
---|---|
date | Mon, 26 Apr 2010 22:26:17 +0200 |
parents | 43685a0541c4 |
children | 384c514bbae2 |
files | scripts/ChangeLog scripts/plot/private/__errplot__.m scripts/plot/private/__pltopt__.m |
diffstat | 3 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -6,6 +6,8 @@ * plot/private/__errplot__.m: Allow x, box and xy errorbars with different syntax. + * plot/private/__errplot__.m: Allow matlab style linestyles, + 2010-04-24 David Bateman <dbateman@free.fr> * plot/private/__patch__.m: Correct order of calling setdata and
--- a/scripts/plot/private/__errplot__.m +++ b/scripts/plot/private/__errplot__.m @@ -53,7 +53,7 @@ elseif (strcmp (fmt.linestyle, "#~>")) ifmt = "boxxy"; else - print_usage (); + ifmt = "matlab"; endif hg = hggroup ("parent", p); @@ -67,6 +67,13 @@ hl = __line__ (hg, "color", fmt.color); endif + if (index (ifmt, "matlab")) + ifmt = "yerr"; + if (! strcmp (fmt.linestyle, "none")) + set (hl, "linestyle", fmt.linestyle); + endif + endif + ## FIXME -- note the code below adds the errorbar data directly as ## ldata, etc properties of the line objects, as gnuplot can handle ## this. Matlab has the errorbar part of the plot as a special line