# HG changeset patch # User Rik # Date 1375679480 25200 # Node ID 828e8852efa9b9736df444b56c63cc29efa0ccb9 # Parent f010db8b710c68067f365958f3cf74f24977d9fb legend.m: Add %!demo block showing bug #39697. * scripts/plot/legend.m: Add %!demo block showing bug #39697. diff --git a/scripts/plot/legend.m b/scripts/plot/legend.m --- a/scripts/plot/legend.m +++ b/scripts/plot/legend.m @@ -595,7 +595,7 @@ linelength = 15; ## Create the axis first - ## FIXME hlegend should inherit properties from "ca" + ## FIXME: hlegend should inherit properties from "ca" curaxes = get (fig, "currentaxes"); unwind_protect ud = ancestor (hplots, "axes"); @@ -706,7 +706,7 @@ gnuplot_offset = unmodified_axes_position(1) ... - unmodified_axes_outerposition(1); endif - ## FIXME - the "fontsize" is added to match the behavior of OpenGL. + ## FIXME: The "fontsize" is added to match the behavior of OpenGL. ## This implies that a change in fontsize should trigger a listener ## to update the legend. The "2" was determined using a long legend ## key in the absence of any subplots. @@ -986,7 +986,7 @@ addlistener (hlegend, "orientation", @updatelegend); addlistener (hlegend, "string", @updatelegend); addlistener (hlegend, "textposition", @updatelegend); - ## TODO - need to add listeners for tighinset and position + ## FIXME: need to add listeners for tighinset and position ## addlistener (ca, "tightinset", @update????); ## addlistener (ca, "position", @update????); endif @@ -1553,6 +1553,11 @@ %! legend ({'12345678901234567890'}, 'location', 'southwestoutside'); %! legend (option); +%!demo % bug 39697 +%! plot (1:10); +%! legend ("Legend Text"); +%! title ({"Multi-line", "titles", "are a", "problem"}); + %!test %! toolkit = graphics_toolkit ("gnuplot"); %! h = figure ("visible", "off");