设置y轴极限matlab图 [英] Set y axis limits matlab plot
本文介绍了设置y轴极限matlab图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
x = - 我有以下正态分布,我需要在y轴上将图形设置为1.5。 0.5:0.0001:3.5;
m1 = 1;
s1 = 0.5;
pdfNormal_1 = normpdf(x,m1,s1);
ylim([0 1.5])
set(gcf,'color','w');
plot(x,pdfNormal_1)%,x,pdfNormal_2);
有人能告诉我怎么做?问候
解决方案
c轴是您需要的功能。 p>
您可以将坐标轴设置为您要使用的值
axis [xmin xmax ymin ymax])
或者您可以使用它进行操作:
axis equal
axis tight
axis off
etc
转到文档以获取更多信息:
http://www.mathworks.co.uk /help/matlab/ref/axis.html?refresh=true
I have the following normal distribution and i need to set the graph plot to 1.5 on y axis.
x = -.5:0.0001:3.5;
m1 = 1;
s1 = 0.5;
pdfNormal_1 = normpdf(x, m1, s1);
ylim([0 1.5])
set(gcf,'color','w');
plot(x, pdfNormal_1)%, x, pdfNormal_2);
Could someone tell me how to? Regards
解决方案
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
这篇关于设置y轴极限matlab图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文