Matlab:使绘图中的网格对数 [英] Matlab: making the grid in plot logarithmic

查看:23
本文介绍了Matlab:使绘图中的网格对数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经绘制了向量,它们已经是对数的,一切都很好.但是现在我有了我的情节,我希望网格是对数的.我在我的代码中写了grid on",我认为应该有办法在情节中做到这一点,但我不记得如何了.如何使网格对数?

I have plotted to vectors against each other, and they are already logarithmic and everything is fine with that. But now that I have my plot i want the grid to be logarithmic. I write "grid on" in my code, and I think there should be a way to do this in the plot, but I can't remember how. How do I make the grid logarithmic?

推荐答案

如果你已经绘制了坐标轴,可以在命令行执行如下:

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

看看 axes 属性 找出您可以修改的其他内容.

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

这篇关于Matlab:使绘图中的网格对数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆