code: #!/usr/bin/python3
  
  import matplotlib.pyplot as plt
  import numpy as np
  
  
  def sigmoid(z):
      return 1.0 / (1.0 + np.exp(-z))
  
  z = np.arange(-7, 7, 0.01)
  phi_z = sigmoid(z)
  
  plt.plot(z, phi_z)
  plt.axvline(0.0, color = 'k')
  plt.axhspan(0.0, 1.0, facecolor = '1.0', alpha = 1.0, ls = 'dotted')
  plt.axhline(0.5, ls = 'dotted', color = 'k')
  plt.yticks([0.0, 0.5, 1.0])
  plt.ylim(-0.1, 1.1)
  plt.xlabel('z')
  plt.ylabel('$\phi (z)$')
  plt.show()
apis: matplotlib.pyplot.axvline matplotlib.pyplot.axhline numpy.exp numpy.arange matplotlib.pyplot.show matplotlib.pyplot.ylabel matplotlib.pyplot.ylim matplotlib.pyplot.plot matplotlib.pyplot.yticks matplotlib.pyplot.xlabel matplotlib.pyplot.axhspan