我创建像这样的子图
fig, (ax1, ax2) = plt.subplots(1, 2, sharex='col', sharey='row')
Run Code Online (Sandbox Code Playgroud)
我用
ax1.plot(x, y)
ax2.plot(x, y)
Run Code Online (Sandbox Code Playgroud)
现在我想将轴格式化为
ax1.xscale('log')
ax1.yscale('log')
Run Code Online (Sandbox Code Playgroud)
但这导致
AttributeError: 'AxesSubplot' object has no attribute 'yscale'
Run Code Online (Sandbox Code Playgroud)
如何设置两个子图的轴格式?
| 归档时间: |
|
| 查看次数: |
3509 次 |
| 最近记录: |