changeset 28737:f98fd55b9557 stable

legend.m: Make BIST test robust against local configuration files (bug #59038) * legend.m: Set properties of axes object needed for test rather than relying on root object defaults.
author Rik <rik@octave.org>
date Mon, 14 Sep 2020 09:17:41 -0700
parents 10060fb23116
children e93ad0cfd9bd 6d35c0db5d2f
files scripts/plot/appearance/legend.m
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/appearance/legend.m	Sun Sep 13 19:55:37 2020 -0700
+++ b/scripts/plot/appearance/legend.m	Mon Sep 14 09:17:41 2020 -0700
@@ -2046,8 +2046,9 @@
 %!testif HAVE_FREETYPE <*40333>
 %! hf = figure ("visible", "off");
 %! unwind_protect
-%!   axes ("units", "normalized");
-%!   plot (1:10);
+%!   hax = axes ("units", "normalized", "fontsize", 10);
+%!   hold on;  # preserve properties of hax in call to plot()
+%!   plot (hax, 1:10);
 %!   hl = legend ("Legend Text", "units", "normalized");
 %!   pos = get (gca, "position");
 %!   set (hf, "position", [0, 0, 200, 200]);