Mercurial > octave
changeset 29017:2e1f9d07f0ab stable
legend.m: use a box-like icon for errorbar plots with box format (bug #59388)
* legend.m (update_icon_position): For all box* formats draw a box.
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Mon, 02 Nov 2020 21:35:56 +0100 |
parents | df307ee1fb30 |
children | c44969d941f9 64d1c7af5b18 |
files | scripts/plot/appearance/legend.m |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/appearance/legend.m Sun Oct 25 20:11:11 2020 +0100 +++ b/scripts/plot/appearance/legend.m Mon Nov 02 21:35:56 2020 +0100 @@ -1317,12 +1317,19 @@ elseif (strcmp (fmt, "xerr")) xdata = [x0+2, x0+2, x0+2, x1-2, x1-2, x1-2, x1-2]; ydata = [ym+2, ym-2, ym, ym, ym+2, ym-2, ym]; - else # "both" + elseif (strcmp (fmt, "xyerr")) xdata = [x0+2, x0+2, x0+2, x1-2, x1-2, x1-2, x1-2, ... xm, xm, xm-2, xm+2, xm, xm, xm-2, xm+2]; ydata = [ym+2, ym-2, ym, ym, ym+2, ym-2, ym, ... ym, y0, y0, y0, y0, y1, y1, y1]; + elseif (strncmp (fmt, "box", 3)) + xdata = [x0+2, x1-2, x1-2, x0+2, x0+2]; + ydata = [y0, y0, y1, y1, y0]; + else + xdata = [x0, x1]; + ydata = [ym, ym]; endif + set (hicon, "markerxdata", xm, "markerydata", ym, ... "xdata", xdata, "ydata", ydata);