Mercurial > hg > octave-nkf
changeset 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 | 56102c33122d |
children | 9302e92df412 |
files | scripts/plot/private/__gnuplot_print__.m |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
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