0

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 Answers1

0

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.

A.M. Ducu
  • 892
  • 7
  • 19
  • Still the same result, because it is adjusting the size of the whole image which takes tick size too into account and not just the plotting area. Is there a way to ignore the ticks and just control the size of the plotting area? – yasir mahmood Jul 05 '21 at 23:28
  • @A.M. Ducu That should be a comment. – Mario May 01 '23 at 12:26