我不能让我的x记号标签旋转,目前他们整体
我试过(代码中显示的,要使用rotation参数,我试过使用plt.setp公司尝试在第一个绘图参数内旋转。如果我只有一个轴,那么它会完美地绘制,因为某些原因,是次轴导致了问题
df_summary['AV_PRICE'] = np.random.randint(30, 150, size=len(df_summary))
plt.figure
df_summary.plot(kind='bar',x='BMCODE_type',y = 'AV_DURATION',xticks=[])
df_summary['AV_PRICE'].plot(secondary_y=True,
legend='TRUE',style='g',ax=None, mark_right=False,xticks=[])
loc = range(len(df_summary))
plt.xticks(loc,df_summary['BMCODE_type'],rotation='vertical')
我希望标签垂直,而不是水平,任何想法都太好了!你知道吗
我知道已经晚了8个月,但是。。。你知道吗
打印次轴时使用
rot
参数并将其设置为90:相关问题 更多 >
编程相关推荐