title: Plotting a list of objects using matplotlib
body: <p>I have a list of objects in which each object represents a point with an x and y value.</p>
  
  <pre><code>class point:
  def __init__(self,x,y):
      self.x = x
      self.y = y
  </code></pre>
  
  <p>I am trying to plot the list of objects using matplotlib but as of right now im not sure of the best implementation of plotting an object with multiple values. Currently I am using a for loop to iterate through the list and plot the values but the graph has unordered axes.</p>
  
  <pre><code>import matplotlib.pyplot as plt
  
  for z in range(len(list)):
     plt.plot(points[z].x,points[z].y, "bo") 
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/fRQ2Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fRQ2Y.png" alt="X and Y axis are out of order"></a></p>
  
  <p>I am unexperienced with python and matplotlib, so any advice is appreciated.</p>