Matlab:使网格在对数坐标下绘制 [英] Matlab: making the grid in plot logarithmic
本文介绍了Matlab:使网格在对数坐标下绘制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
如果已经绘制了坐标轴,则可以在命令行上执行以下操作:
$ 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屋!
查看全文