changeset 29018:c44969d941f9

maint: merge stable to default.
author Rik <rik@octave.org>
date Mon, 02 Nov 2020 13:52:57 -0800
parents 3b90b3b00451 (current diff) 2e1f9d07f0ab (diff)
children be883573bbcc
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 Nov 01 11:31:57 2020 +0100
+++ b/scripts/plot/appearance/legend.m	Mon Nov 02 13:52:57 2020 -0800
@@ -1321,12 +1321,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);