matplotlib.axes.Axes.set_ymargin#

Axes.set_ymargin(m)[source]#

Set padding of Y data limits prior to autoscaling.

m times the data interval will be added to each end of that intervalbefore it is used in autoscaling. Ifm is negative, this will clipthe data range instead of expanding it.

For example, if your data is in the range [0, 2], a margin of 0.1 willresult in a range [-0.2, 2.2]; a margin of -0.1 will result in a rangeof [0.2, 1.8].

Parameters:
mfloat greater than -0.5
On this page