In Python the 'figsize' sets the size of the whole image, so if there are two decimal points in ticks, the figure size is different when ticks have 4 decimal points. How can I set the size of just the rectangle within which the plot exists so the plot size remains same irrespective of the tick or label size? For comparison, the following images have same fig size, but different tick size, which makes the plot of different sizes.

1

There are 1 best solutions below

2
On

You could try to use the "dpi" parameter when setting the figure. I.e. figure(figsize=(3, 3), dpi=100)

More info about it here and here.