Plot points

Please consider the following example for plotting simple points.

import matplotlib.pyplot as plt  # import files for plot library 

#plt.plot(<list for x coordinates>,<list of y coordinates>,<any style, BLUE OVAL (bo) here>)
plt.plot([2,4],[1,3],'bo')
plt.plot([3],[4],'ro') # ro for RED OVAL here

#plt.axis([<starting x axis>, <ending X axis>, <starting Y axis>, <ending Y axis>])
plt.axis([0, 7, 0, 5])
plt.grid(True) # for grid visibility
plt.show() 

Output

Untitled

Share

You may also like...