title: Python Scatter Plot: Cannot connect points
body: <p>I have two lists:</p>
  
  <pre><code>x = [5, 5, -5, -5, 10, 10, -10, -10, 15, 15, -15, -15, 20, 20, -20, -20]
  y = [-5, 5, 5, -10, -10, 10, 10, -20, -15, 15, 15, -30, -20, 20, 20, -40]
  </code></pre>
  
  <p>plotting the points:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  plt.scatter(x, y)
  </code></pre>
  
  <p>I get:</p>
  
  <p><a href="https://i.stack.imgur.com/lCwuB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lCwuB.png" alt="enter image description here"></a></p>
  
  <p>but when I want to connect the points, I get:</p>
  
  <pre><code>plt.scatter(x, y, "-")
  </code></pre>
  
  <blockquote>
    <p>TypeError: ufunc 'sqrt' not supported for the input types, and the
    inputs could not be safely coerced to any supported types according to
    the casting rule ''safe''</p>
  </blockquote>