Mercurial > hg > octave-nkf
diff scripts/plot/private/__gnuplot_print__.m @ 16801:d3beeaf1d363
Avoid changing the fontsize of a legend's text strings when printing.
legend.m: Changing the fontsize of a legend results in a legend's children
being replaced. Rely upon the legend object font properties to in order to
update the legend's text strings' font properties.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Sat, 22 Jun 2013 15:24:00 +0800 |
parents | 3cce6b4e0f7c |
children | bbda4d952eb5 |
line wrap: on
line diff
--- a/scripts/plot/private/__gnuplot_print__.m +++ b/scripts/plot/private/__gnuplot_print__.m @@ -293,6 +293,17 @@ function [h, fontsize] = get_figure_text_objs (opts) h = findall (opts.figure, "-property", "fontsize"); + hp = get (h, "parent"); + if (iscell (hp)) + hp = cell2mat (hp); + endif + ## Do not change the text objects fontsizes for the children of a + ## legend axes. These will be handled by the fontsize listener. + is_legend_key_string = strcmp (get (hp, "tag"), "legend") ... + & isprop (hp, "string") ... + & isprop (hp, "location") ... + & strcmp (get (hp, "type"), "axes"); + h(is_legend_key_string) = []; fontsize = get (h, "fontsize"); switch (numel (fontsize)) case 0