【发布时间】:2019-10-18 14:03:28
【问题描述】:
我想在 matplotlib 中制作子图并设置不同的属性:
但我有一个错误'AxesSubplot' object has no attribute 'setp'
fig, ax = plt.subplots()
ax.axvline(x=654.31, linewidth=4, ls = '--', color = 'Gold' )
(markers, stemlines, baseline) = ax.stem(dfs.index, dfs.RTCM)
ax.setp(stemlines, linestyle="-", color="olive", linewidth=0.5 )
我找不到解决问题的方法。 我将不胜感激。
【问题讨论】:
-
这个错误需要从字面上理解:该命令根本不存在。而是
plt.setp。
标签: python-3.x matplotlib subplot