I am trying to set the size of a figure using fig1.set_size_inches(5.5,3) in python, but the graph creates a drawing where the x mark is not completely visible. The shape itself has the size that I need, but it seems that the axis inside is too tall, and the x mark just doesn't fit anymore.
here is my code:
fig1 = plt.figure() fig1.set_size_inches(5.5,4) fig1.set_dpi(300) ax = fig1.add_subplot(111) ax.grid(True,which='both') ax.hist(driveDistance,100) ax.set_xlabel('Driven Distance in km') ax.set_ylabel('Frequency') fig1.savefig('figure1_distance.png')
and here is the result of the file:

source share