Set y axis limits matlab plot

冷暖自知 提交于 2019-12-01 12:16:49

The axis function is the one you need.

you can set the axis to the values you want using

axis([xmin xmax ymin ymax])

or you can play with it doing things like:

axis equal
axis tight
axis off

etc

Go to the documentation for more info:

http://www.mathworks.co.uk/help/matlab/ref/axis.html?refresh=true

Try this,

x = -.5:0.0001:3.5;
m1 = 1;
s1 = 0.5;
pdfNormal_1 = normpdf(x, m1, s1);
set(gcf,'color','w');
plot(x, pdfNormal_1)%, x, pdfNormal_2);
ylim([0 1.5])
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!