python-3.x - 在python中命名轴

标签 python-3.x matplotlib

我了解使用 matplotlib .

plt.xlabel('x-axis')

plt.yablel('y-axis')

可以在python中用于命名轴和标题等,只是在寻找病房来命名其他轴。

enter image description here

最佳答案

import matplotlib.pyplot as plt  
x = [1,2,3]
y = [3,4,6]

p = plt.plot(x,y)
plt.twinx().set_ylabel('right Y lable')

output

关于python-3.x - 在python中命名轴,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51418022/

相关文章:

python - 在 python (pytest) 测试中使用资源文件

python-3.x - 如何从 TinyDB 数据库中检索单个值?

python - 使用 % 和//求除数

python - Matplotlib - 如何删除特定的直线或曲线

python - 从 Matplotlib 图例中排除 Cartopy 元素

python - pandas 情节时间序列-出现奇怪的线

python - 使用 Series.plot() 绘制每小时数据

python - 无法成功执行以下脚本

python - matplotlib.pyplot 在相等范围内绘制 x 轴刻度

python - 如何将字典各个键值添加在一起?