diff scripts/plot/legend.m @ 16002:cddf9103a566

Fix legend bugs (#38263, #38265). * scripts/plot/legend.m: Add listener for the legend hggroup "fontsize" property, and add "fontsize" to the updated properties. * scripts/plot/private/__go_draw_axes__.m: Limited supprt for changing the color of the legend's text labels.
author Ben Abbott <bpabbott@mac.com>
date Tue, 05 Feb 2013 10:56:46 -0500
parents cf191298a287
children 8899c785cc99
line wrap: on
line diff
--- a/scripts/plot/legend.m
+++ b/scripts/plot/legend.m
@@ -874,6 +874,7 @@
         if (addprops)
           addlistener (hlegend, "edgecolor", @updatelegendtext);
           addlistener (hlegend, "textcolor", @updatelegendtext);
+          addlistener (hlegend, "fontsize", @updatelegendtext);
           addlistener (hlegend, "interpreter", @updatelegendtext);
           addlistener (hlegend, "location", @updatelegend);
           addlistener (hlegend, "orientation", @updatelegend);
@@ -915,7 +916,10 @@
   text_kids = findobj (kids, "-property", "interpreter", "type", "text");
   interpreter = get (h, "interpreter");
   textcolor = get (h, "textcolor");
-  set (text_kids, "interpreter", interpreter, "color", textcolor);
+  fontsize = get (h, "fontsize");
+  set (text_kids, "interpreter", interpreter,
+                  "fontsize", fontsize,
+                  "color", textcolor);
 endfunction
 
 function hideshowlegend (h, d, ca, pos1, pos2)