diff scripts/plot/__go_draw_axes__.m @ 9191:ad33527d2e51

Have 'legend' inherit font properties from the parent axis.
author Ben Abbott <bpabbott@mac.com>
date Fri, 08 May 2009 21:11:05 -0400
parents 22ae6b3411a7
children ab952265ad06
line wrap: on
line diff
--- a/scripts/plot/__go_draw_axes__.m
+++ b/scripts/plot/__go_draw_axes__.m
@@ -1209,7 +1209,13 @@
 	otherwise
 	  pos = "";
       endswitch
-      fprintf (plot_stream, "set key %s %s %s %s;\n", inout, pos, box, reverse);
+      if (__gnuplot_has_feature__ ("key_has_font_properties"))
+        fontspec = create_fontspec (axis_obj.fontname, axis_obj.fontsize);
+      else
+	fontspec = "";
+      endif
+      fprintf (plot_stream, "set key %s %s %s %s %s;\n", inout, pos, box,
+               reverse, fontspec);
     else
       fputs (plot_stream, "unset key;\n");
     endif