How to change the linewidth in a figure before actually plotting some?
553 views (last 30 days)
This question maybe a bit like the link below, but this didn't work for me... http://nl.mathworks.com/matlabcentral/answers/102530-how-can-i-change-the-default-settings-for-the-linewidth-property-before-i-plot-a-figure-in-matlab
I'm working on a matlab function that automatically opens your figure in full screen mode and on a second monitor if present. So far, everything works fine. I already achieved to set the fontsize inside the function, so whitout plotting anything and without making xlabel(..) etc.:
% Fontsize used at the figure
if ~exist('fontsize_manual','var')|| isempty(fontsize_manual)
Now is my question: Can I change in a same way the linewidth of the lines that will by plotted in the figure? So also here, predefining the linewidth inside the function and later on in your script plotting some lines etc. I do prefer this works only for the figure you're working on, so that you can change this 'default' for each figure and save them all with different linewidth and fontsizes if needed.
I tried the line below, but that only changed the linewidth of the axis.
Is there anyone who can help me solving this problem?
dpb on 2 Dec 2014
Use the technique of the referenced page but set the default for the figure in question --
NB: the default properties are named in run-on fashion--the name of the object you're setting then the property within that object all preceded with the keyword 'Default'. Here that's
to separate the subsets visually. I think it would've been easier if TMW had used such nomenclature or a structure form instead (and probably the parsing internally would've been simpler as well).