0
A
回答
2
看着matplotlib spine placement demo你会发现你可以使用ax.spines['left'].set_position('zero')
来移动刺。
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
x = np.linspace(-3,3)
y = x**2
fig, ax = plt.subplots()
ax.set_ylim(-4,10)
ax.set_xlim(-10,10)
ax.plot(x, y)
ax.spines['left'].set_position('zero')
ax.spines['right'].set_color('none')
ax.spines['bottom'].set_position('zero')
ax.spines['top'].set_color('none')
plt.show()
相关问题
- 1. 沿着世界坐标轴旋转
- 2. matplotlib mac OSX 10.8中断标记和坐标轴标记
- 3. matplotlib:更改坐标轴
- 4. 3D沿着一个歪斜变换矩阵坐标轴
- 5. 用matplotlib x轴标记
- 6. Highcharts记录坐标轴2
- 7. Matplotlib与plyplot.subplot()命令共享坐标轴?
- 8. 在matplotlib中移动坐标轴文本
- 9. 删除matplotlib子图中的坐标轴?
- 10. 坐标轴中的按钮(matplotlib)
- 11. 在matplotlib中翻转坐标轴grafic
- 12. 在matplotlib中设置一个坐标轴
- 13. Matplotlib极坐标图的反径向轴
- 14. python matplotlib:转置坐标轴的方法
- 15. 蟒蛇坐标轴绘图 - matplotlib
- 16. matplotlib坐标轴上的不同精度
- 17. Matplotlib:着色轴/刻度标签
- 18. 使用Canvas标记图形坐标轴
- 19. 在坐标轴上绘制标记
- 20. 沿着它的圆圈删除标记
- 21. 坐标轴标记和多点坐标中的刻度
- 22. Matplotlib轴标签
- 23. Papervision3D坐标轴
- 24. Matplotlib X-标签数坐标
- 25. 用matplotlib中的文本标注坐标轴
- 26. 在matplotlib中更改坐标轴的颜色,刻度和标签
- 27. matplotlib极坐标图科学记数法
- 28. matplotlib坐标格式
- 29. Matplotlib设定坐标
- 30. matplotlib GUI imshow坐标
感谢您的帮助和链接! –