How can I set the window size of a plot window?

≡放荡痞女 提交于 2019-12-03 10:33:54

Yes, it is possible:

figure(1, 'position',[startx,starty,width,height]);
plot(0:20,sin(0:20));

[startx,starty] are the coordinates for the lower left corner of your figure (window).

You can also use the resolution option of the print function

print('aa.png','-dpng','-r300');

I guess the first solution might be better...

Regards

Bojan Petrovic

You can use the code below if you want to maximize:

figure(1,"position",get(0,"screensize"))

As of octave version 4.2.2, the following works, as pointed out by Janusz Lenar:

print('filename.png', '-dpng', '-S1280,720');

Which scales the figure to create a 1280x720 pixel image.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!