在一个循环中,我使用Matplotlib创建了一些子图.
我注意到在某些情况下,Y轴(尤其是在显示0时)在Y轴上显示了一些负数.
是否有一个参数可以强制Y轴显示正数(即从0开始向上显示).
还有一个参数,用于使Y轴的值等于或不等于小数位. (显示2而不是2.0或2.00(似乎会自动显示,具体取决于数据).
码:
for a in account_list:
f = plt.figure()
f.set_figheight(20)
f.set_figwidth(20)
f.sharex = True
f.sharey=True
left = 0.125 # the left side of the subplots of the figure
right = 0.9 # the right side of the subplots of the figure
bottom = 0.1 # the bottom of the subplots of the figure
top = 0.9 # the top of the subplots of the figure
wspace = 0.2 # the amount of width reserved for blank space between subplots
hspace = .8 # the amount of height reserved for white space between subplots
subplots_adjust(left=left, right=right, bottom=bottom, top=top, wspace=wspace, hspace=hspace)
count = 1
for h in headings: