Matplotlib中的Python条形图如何更改X轴

2024-05-20 00:04:55 发布

您现在位置:Python中文网/ 问答频道 /正文

很简单,可能是个愚蠢的问题,但我找不到答案:

如何调整Matplotlib中条形图的X轴?在

目前我的代码:

_ = matplotlib.pyplot.bar(names, value, color="blue")
_.axis([-11,11,0,1])

退货 -->;AttributeError: 'BarContainer' object has no attribute 'axis'


Tags: 答案代码gtnamesmatplotlibvaluebarblue