title: How to draw a triangle using matplotlib.pyplot based on 3 dots (x,y) in 2D?
body: <p>I would like to draw a triangle using python3 module matplotlib.</p>
  
  <pre><code>import numpy as np 
  import matplotlib.pyplot as plt
  
  X_train = np.array([[1,1], [2,2.5], [3, 1], [8, 7.5], [7, 9], [9, 9]])
  Y_train = ['red', 'red', 'red', 'blue', 'blue', 'blue']
  
  plt.figure()
  plt.scatter(X_train[:, 0], X_train[:, 1], s = 170, color = Y_train[:])
  plt.show()
  </code></pre>
  
  <p>It displays 6 dots but they are grouped separately in 2 places. (color helps to see it clearly)  </p>
  
  <p>There are 2 sets of 3 dots. I want each set(3 dots)  be united in the triangle. </p>
  
  <p>How is it possible to implement this? How to build a triangle based on 3 dots using matplotlib?</p>
  
  <p>Any suggestions are appreciated ;)</p>