Human: Python function to create a set limits on axis. Assistant: 
Here is a Python function to create a set limits on axis

import matplotlib.pyplot as plt

def set_axis_limits(ax, xmin, xmax, ymin, ymax):
  """Set limits on axis."""
  ax.set_xlim(xmin, xmax)
  ax.set_ylim(ymin, ymax)

# Enter the figure
fig = plt.figure()

# Enter the axis
ax = fig.add_subplot(111)

# Calling the function
print((set_axis_limits(ax, -1, 1, -1, 1)))

#Example Output
# None

#Remember to inspect code for bugs.