How to draw axis in the middle of the figure?
One way to do it is using spines: import math import numpy as np import matplotlib.pyplot as plt def sigmoid(x): a = [] for item in x: a.append(1/(1+math.exp(-item))) return a x = np.arange(-10., 10., 0.2) sig = sigmoid(x) fig = plt.figure() ax = fig.add_subplot(1, 1, 1) # Move left y-axis and bottom x-axis to centre, …