matplotlib.axes.Axes.set_xmargin#

Axes.set_xmargin(m)[source]#

Set padding of X data limits prior to autoscaling.

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

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

Parameters:
mfloat greater than -0.5

Examples using matplotlib.axes.Axes.set_xmargin#

Automatically setting tick positions

Automatically setting tick positions

Automatically setting tick positions