开发者

Plot Cumulative Distribution Function (logarithmic x-axis / y-axis) in MatLab

I was using cdfplot, but it doesn't work as I need.

How can I get the x开发者_StackOverflow社区-axis become logarithmic? and how can I do it for y-axis?


You can do that by looking into handle graphics. Just run this code after you run cdfplot:

set(gca,'XScale','log')

What it does: it gets the axis handle (gca/get current axis) and sets it's XScale property. To know what properties are available, you can either consult the help or run inspect(gca).

You can also do the same thing manually on a single plot, to do this, you just plot everything and in the Figure window use the Tools > Edit Plot option. Then double click on the axis and you can set most properties right there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜