[英]I can't make the size of my graph bigger using matplotlib.pyplot and using plt.figure(figsize = (10, 12))
how can fix this.如何解决这个问题。 my code:
我的代码:
plt.plot(kobe.Year, kobe['2P'], label = '2points made')
plt.xlabel('year')
plt.ylabel('2 points made')
plt.title('Kobe Bryant 2points made in his career')
plt.legend(loc = 'best')
plt.figure(figsize = (10, 12))
this does not work这不起作用
You should specify first your plot's size and other arguments such as edge color, style etc. So:您应该首先指定绘图的大小和其他 arguments,例如边缘颜色、样式等。所以:
plt.figure(figsize = (10, 12)) # remove last line and put it here
plt.plot(kobe.Year, kobe['2P'], label = '2points made')
plt.xlabel('year')
plt.ylabel('2 points made')
plt.title('Kobe Bryant 2points made in his career')
plt.legend(loc = 'best')
plt.show()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.