Set legends linewidth for all open figures/plots at once

7 views (last 30 days)
Hi!
Since I a bit colourblind and using a 4k screen, so I need to set bigger fonts and linewidth so I see the text and colours properly.
So far, I've been able to add a function to my matlab path which I run every time I want to change the plot/figure to my liking. However, I am missing how I can edit the legend textwidth and font size. Is there a way to set a default value or for current session without having to sending the legend to a function, or to find it using:
get(findall(gca, 'type', ""LEGEND""))
This is the code I have so far:
This is the code so far:
function f = sfd() % set figure defaults
set(groot,'defaultLegendLineWidth',3)
set(groot,'defaultAxesLineWidth',1)
set(groot,'defaultGraphplotLineWidth',1)
set(groot, 'DefaultAxesTitleFontSizeMultiplier', 1.5) ;
set(groot,'defaultLineLineWidth',1)
set(findall(gcf,'type','line'),'linewidth',4);
set(findall(gca,'type','line'),'linewidth',4);
end
  1 Comment
David J. Mack
David J. Mack on 6 Oct 2017
Edited: David J. Mack on 6 Oct 2017
Hey Martin, does not seem to be that easy. You have to set the LegendFontSize and the LegendFontSizeMode to achieve an actual effect. Have a look here for a similar problem: Default Text Size in Legends

Sign in to comment.

Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!