how to set graph size
Mostrar comentarios más antiguos
how to set my graphic size to (w:h=550:400) now my graph size is 560:420 (automatic) [ day_number, daily_rain ] = DailyRain( RainData, 2010, 1); andemande = plot( day_number, daily_rain,'-ok' ); set(andemande,'LineWidth',1); day_numbermax = max(day_number); day_numbermin = min(day_number); datetick('x','dd-mmm','keepticks') grid on; ylabel('Akumulasi Curah Hujan (mm)') xlabel('Hari') xlim([day_numbermin day_numbermax])
1 comentario
Soni huu
el 28 de Feb. de 2013
Respuesta aceptada
Más respuestas (1)
Amirhossein Sadeghi Manesh
el 22 de Jul. de 2021
Editada: Amirhossein Sadeghi Manesh
el 22 de Jul. de 2021
Resizing the figure is mentioned at Matlab's documentation.
doc figure
Scroll down to the Change Figure Size section.
If you hadn't assigned a name for your figure, then use gcf (cf in gcf stands for current figure).
fig=gcf;
fig.Position(3:4)=[550,400];
And put these two lines before your plot of interest.
If your aim is to just change the width and height of your figure as your question sounds like that, then you don't need to change the first and second entries of position. The first two entries are about the position of the figure window in your screen which you can drag and drop that window and has no effect on the size of the figure (and thus no effect on what you put into your paper/book ^_^).
Categorías
Más información sobre Graphics Object Properties en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!