title: python, matplotlib, how to plot only part of a curve
body: <p>I plot a curve on a certain place in a graph, now I want only part of this curve to show.
  Only the part where x &lt; 0
  so it should show the part of the curve that is left of the zero point on the x axis.</p>
  <pre><code>plt.figure(figsize=(15, 6))
  xlim(-36, 23)
  ylim(-33, 1033)
  plt.title('Sucker Curve')
  plt.grid()
  
  x = np.linspace(-50, 50, 100)
  y = np.linspace(-50, 50, 100)
  plt.xlabel('profit / loss in percent of avgcost')
  plt.plot(x, y, alpha=0.0)
  
  # should be visible till x = 0
  ylb = 0.36 * x**2  # loss buy
  plt.plot(x + 12.33, ylb + 196, color='blue', label='loss buy curve')
  
  # should be visible starting from x = 0
  yps = (- 0.4739 * x**2)  # profit sell curve
  plt.plot(x- 6.66, yps + 273, color='red', label='profit buy curve')
  
  plt.ylabel('percent of settings.MAX_POSITION')
  plt.legend()
  show()
  </code></pre>
  <p>I tried</p>
  <pre><code>ylb = 0.36 * x**2  # loss buy
  plt.plot(x[x &lt; 0] + 12.33, ylb[x &lt; 0] + 196, color='blue', label='loss buy curve')
  </code></pre>
  <p>but it is not sharp on the x axis zero  . .</p>