MATLAB Answers

0

how to set graph size

Asked by Soni huu on 28 Feb 2013
Latest activity Commented on by Dariush Ashtiani on 14 Jul 2018

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 Comment

code to set..

Sign in to comment.

1 Answer

Answer by Azzi Abdelmalek
on 28 Feb 2013
Edited by Azzi Abdelmalek
on 22 Aug 2015
 Accepted Answer

Use

x0=10;
y0=10;
width=550;
height=400
set(gcf,'units','points','position',[x0,y0,width,height])

Units can be

[ inches | centimeters | normalized | points | {pixels} | characters ]

  3 Comments

ممكن مساعدة

Thank you Azzi for short and to the point answer

Sign in to comment.