Advertisement
lessientelrunya

plot2_code

Jun 28th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. import numpy as np
  2. import matplotlib.pyplot as plt
  3. # To configure matplotlib to embed the plots in the output cells of the present notebook
  4. %matplotlib notebook
  5. In [26]:
  6. X = np.array([[1,1], [2,2.5], [3,1.2], [5.5,6.3], [6,9], [7,6], [8,8]]) # Define numpy array of two-dim points
  7. plt.figure()
  8. plt.scatter(X[:,0], X[:,1], s = 170, color = 'black') # Plot points with slicing syntax X[:,0] and X[:,1]
  9. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement