Matlab: making the grid in plot logarithmic

梦想的初衷 提交于 2019-12-02 04:22:53

If you use loglog, semilogx or semilogy instead of plot, the grid will automatically be on a log scale for the corresponding axes when using grid on.

If you have already plotted the axes, you can execute the following on the command line:

set(gca,'yscale','log') %# to set the y-axis to logarithmic
set(gca,'xscale','log') %# to set the x-axis to logarithmic

Have a look at axes properties to find out what else you can modify.

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