import matplotlib.pyplot as plt
import numpy as np
# basic
"""
x=[1,5]
y=[1,5]
plt.plot(x,y)
plt.show()
"""

# axis values/name

"""
x=[1,2,3,4,5]
y=[1,3,5,7,9]
plt.plot(x,y)
plt.title('My Line')
plt.axis([0, 3, 0, 5])
plt.xlabel('x')
plt.ylabel('y')
plt.show()
"""
# Draw points by specific coords (x,y)
"""
plt.plot([1, 2, 3, 4, 5], [2, 4, 8, 16, 32],'ro') # ro red dots not connected
plt.axis([0, 6, 0, 35])
plt.title('My dots')
plt.xlabel('x')
plt.ylabel('y')
plt.show()
"""
# Use colors

"""
x=[]
y1=[]
y2=[]
for i in range(0,30):
    x.append(i/10)
    y1.append(pow(i/10,2)) #pow(x,y) calculates the y power of x
    y2.append(pow(i/10,3))
plt.plot(x, y1, 'r--')   # red
plt.plot(x, y2, 'g+')    # green
plt.xlabel('x')
plt.ylabel('y')
plt.show()
"""

# Using np features and plot

"""
t = np.arange(0.0, 2.0, 0.01)
s = 3*np.sin(2 * np.pi * t)
plt.plot(t, s)
plt.grid() # display grid lines
plt.title("Sine wave")
plt.xlabel("time (s)")
plt.ylabel("sine wave")
plt.show()
"""
# scatter points by coords

x1 = [1,2,3,4,5]
y1 = [5,4,3,3,6]
x2 = [6,7,8,9,10]
y2 = [4,3,4,2,1]
plt.scatter(x1, y1, c='red')
plt.scatter(x2, y2, c='yellow')
plt.show()

