configuration of subplots - editing titles, fonts and so on
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hey everyone,
I currently have to create a lot of subplots, and for each I want to set:
colormap gray; axis image; title('title of spesific subplot','fontname','times','fontsize',16);
Is there any way for me to configure this line only once for all of my subplots instead of adding it for each line I write?
maybe entering the 'title of specific subplot' itself as an array?
thanks,
0 Commenti
Risposte (1)
dpb
il 21 Dic 2019
That would be the obvious solution, yes. If the specific title is more or less random text, that's about the only way other than to have saved in an external text file that you read. If it's a generic title that only changes owing to some parameter, then it could be generated programmatically.
From the above limited description, structure the code as a loop over the number of subplots desired something like
nr=3; nc=2; % number rows, columns in subplot figure
nt=nr*nc; % total number subplots
for i=1:nt % for each subplot in order
hAx(i)=subplot(nr,nc,i); % create each subplot; save the axes handles
% do whatever for each subplot here
...
end
Vedere anche
Categorie
Scopri di più su Subplots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!