Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在python中绘制半对数图?_Python_Matplotlib_Plot - Fatal编程技术网

如何在python中绘制半对数图?

如何在python中绘制半对数图?,python,matplotlib,plot,Python,Matplotlib,Plot,如何在python中绘制半对数图?X轴为对数,y轴为线性。目前,我正在探索阶段与欧米茄,我需要y轴是线性的,而x轴是对数的。我可以在python中这样做吗?使用semilogx,如文档所示 一个简单的例子: import matplotlib.pyplot as plt plt.semilogx([1, 10, 100], [1, 10, 100]) plt.xlabel("Omega") plt.ylabel("phase") plt.show() 这很有帮助。。谢谢@Jingjie

如何在python中绘制半对数图?X轴为对数,y轴为线性。目前,我正在探索阶段与欧米茄,我需要y轴是线性的,而x轴是对数的。我可以在python中这样做吗?

使用
semilogx
,如文档所示

一个简单的例子:

import matplotlib.pyplot as plt
plt.semilogx([1, 10, 100], [1, 10, 100])
plt.xlabel("Omega")
plt.ylabel("phase")
plt.show()

这很有帮助。。谢谢@Jingjie