Matlab:使网格在对数坐标下绘制 [英] Matlab: making the grid in plot logarithmic

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

问题描述

我已经绘制了对彼此的向量,他们已经是对数的,一切都很好。但现在我有我的情节我想要网格是对数。我在代码中写入grid on,我认为应该有一种方法可以在剧情中做到这一点,但我不记得如何。如何使网格对数?

解决方案

如果已经绘制了坐标轴,则可以在命令行上执行以下操作:
$ b $

  set(gca,'yscale','log')%#设置y轴为对数
set(gca,'xscale','log')%#设置x轴为对数



<看看 axes properties 找出你可以修改的东西。


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

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

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

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