R plots automatically set the x and y limits to put some space between the data and the axes. I was wondering if there is a way for matplotlib to do the same automatically. If not, is there a good formula or ‘rule of thumb’ for how R sets its axis limits?
Share
Looking at
?parfor the parameterxaxs:So if we try this out:
We can actually demonstrate that it’s +/- 4% of the range on each side: