changeset 17179:828e8852efa9

legend.m: Add %!demo block showing bug #39697. * scripts/plot/legend.m: Add %!demo block showing bug #39697.
author Rik <rik@octave.org>
date Sun, 04 Aug 2013 22:11:20 -0700
parents f010db8b710c
children 54e251e699bb
files scripts/plot/legend.m
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/legend.m	Sun Aug 04 20:35:55 2013 -0400
+++ b/scripts/plot/legend.m	Sun Aug 04 22:11:20 2013 -0700
@@ -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");