title: How can I put ax like a plot and no subplot with matplotlib?
body: <p>this is the code:</p>
  
  <pre><code>#/usr/bin/env python3
  # -*- coding: utf-8 -*-
  
  
  import numpy as np
  import matplotlib.pyplot as plt
  
  
  f = lambda x: pow(x, 3) / (pow(x, 2) - x - 6)
  
  
  fig, ax = plt.subplots()
  x = np.linspace(-15.0, 15.0, 1000)
  plt.axis([x[0], x[-1], -15.0, 15.0])
  ax.spines['left'].set_position('center')
  ax.spines['right'].set_color('none')
  ax.spines['bottom'].set_position('center')
  ax.spines['top'].set_color('none')
  ax.spines['left'].set_smart_bounds(True)
  ax.spines['bottom'].set_smart_bounds(True)
  ax.xaxis.set_ticks_position('bottom')
  ax.yaxis.set_ticks_position('left')
  ticks = []
  for i in range(-15, 16, 5):
      ticks.append(i)
  ticks.remove(0)
  ax.set_xticks(ticks)
  ax.set_yticks(ticks)
  plt.plot(x, f(x), color='b', linestyle='-', lw=1.5)
  plt.plot(x, x + 1.0, color='b', linestyle='--', lw=1.5)
  plt.legend([r'$f(x)=\frac{x^3}{x^2-x-6}$', r'$y=x+1$'], loc='lower right')
  plt.title('Discontinuous Function')
  plt.grid('on')
  plt.show()
  </code></pre>
  
  <p>I want to set ax like a plot, not like a subplots. How can I change it? Thanks.</p>