Actual figure size is changing after saving

359 views Asked by At

I am a new user of matplotlib and trying to plot some figures for my publication.

To set the same size I used the following two lines in my code:

#cm=1/2.54

#plt.figure (figsize=(7.6cm,4.2cm))

I used the same code for two different graphs. But when I opened the saved figures, I have found that the actual figure size became (8.23,4.72) and (7.67,4.59) for the following images.

8.23,4.72 in cm 7.67,4.59 in cm

It seems that the width is increasing with the increasing Y ticks value size(For one figure its 0.02 and other its 2, taking more space).I would really appretiate if someone can tell me how to save the figure with exactly same size which means all the other parameters like ticks, legend size etc will be included in the fig size.

The codes are long thats why I am not including them here. I don't know if its possible to include a attachment. But if someone wants to have a look then I am happy to share. Thanks in advance.

0

There are 0 answers