How do we change the size of a figure (graph) to be larger than the default?
22 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi, the size of my screen is 1366x768 (width x height). How can I force the graph below (via command line) to use the entire screen instead of a small figure?
w = 0:pi/100:2*pi;
y1 = sin(w)';
h=plot(w,y1);
I thank you in advance for your help
Emerson
0 commentaires
Réponse acceptée
José-Luis
le 3 Oct 2012
scrsz = get(0,'ScreenSize');
figure('Position',scrsz);
plot(rand(10,1));
5 commentaires
Plus de réponses (1)
Azzi Abdelmalek
le 3 Oct 2012
Modifié(e) : Azzi Abdelmalek
le 3 Oct 2012
set(gcf, 'PaperUnits', 'centimeters','PaperPosition', [0 0 15 15])
% you can change paperunits to 'inches' or 'points',...
2 commentaires
Azzi Abdelmalek
le 3 Oct 2012
Modifié(e) : Azzi Abdelmalek
le 3 Oct 2012
Ok, because it changed it when you save it to an image file (jpg,...)
José Luis's code is fine
Voir également
Catégories
En savoir plus sur Annotations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!