How to plot y-axies?

2 次查看(过去 30 天)
skysky2000
skysky2000 2017-3-15
评论: Rik 2017-3-15
Dear all, Could help me please about how to plot y-axies as seen in the figure below:
Thanks...

回答(2 个)

Rik
Rik 2017-3-15
编辑:Rik 2017-3-15
This is a logarithmic plot. So when you use the semilogy function, you can use
set(gca,'YTick',[1 2 8 16])
On newer versions of Matlab (I believe 2015b and later), you can use the yticks function (see this help page).

skysky2000
skysky2000 2017-3-15
not work.
  1 个评论
Rik
Rik 2017-3-15
What code are you using, because I get the axis you need with the code below:
x=[250 500 600 700 780];
y=[16 8 4 2 1];
semilogy(x,y)
set(gca,'YTick',[1 2 4 8 16])

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Line Plots 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by