[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #49469] changing axes fontsize does not change
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #49469] changing axes fontsize does not change labels too |
Date: |
Fri, 28 Oct 2016 15:27:51 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 |
Update of bug #49469 (project octave):
Priority: 5 - Normal => 3 - Low
Status: None => Confirmed
Release: 4.0.3 => dev
_______________________________________________________
Follow-up Comment #1:
Yes, this is a known incompatibility. There are two easy workarounds which
has meant no great pressure to fix this. I suspect that situation will
continue for a while.
Workaround #1 :
Do all your plotting routines, change the axes fontsize, then do all the
commands to annotate and make the plot beautiful such as adding labels and
titles.
plot (1:10);
set (gca, "fontsize", 20);
xlabel ("x-axis label");
ylabel ("y-axis label");
title ("Title of plot");
Workaround #2 :
Change all the label fontsizes at the same time you change the axes fontsize.
set (gca, "fontsize", 20);
set (get (gca, "title"), "fontsize", 20);
set (get (gca, "xlabel"), "fontsize", 20);
set (get (gca, "ylabel"), "fontsize", 20);
## If you have zlabel, add this too
set (get (gca, "zlabel"), "fontsize", 20);
Workaround #3 :
Add a listener to the axes fontsize property which does what was done in
Workaround #2.
function update_fontsize (h, ~)
hlist = get (h, {"xlabel", "ylabel", "zlabel", "title"});
new_fontsize = get (h, "fontsize");
set ([hlist{:}], "fontsize", new_fontsize);
endfunction
addlistener (gca, "fontsize", @update_fontsize)
This isn't quite perfect because it doesn't respect LabelFontSizeMultiplier
and TitleFontSizeMultiplier, but you get the idea.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?49469>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/