In [1]:
import matplotlib.pyplot as plt
In [2]:
x = 3
y = 5

#plt.plot(x,y,'ro')
#plt.plot(x,y,'gs')
plt.plot(x,y,'kp')

plt.axis('square')
plt.axis([-6,6,-6,6])
plt.grid()

plt.show()
In [3]:
plt.axis([-6,6,-6,6])
plt.axis('square')
plt.grid()

plt.show()
In [4]:
x = [-4,5,2,4,5,6,3]
y = [0,3,4,5,2,-3,4]

for i in range(0,len(x)):
    plt.plot(x[i],y[i],'o')
    
plt.show()
In [5]:
for i in range(0,len(x)):
    plt.plot(x[i],y[i],'o',label='point %s' %(1+i))

plt.axis('square')
plt.grid()
plt.legend()
plt.show()
In [6]:
plt.plot(4,2,'r+')

axis = plt.gca() # get current axis
ylim = axis.get_ylim()
print(ylim)

axis.set_ylim([ylim[0],5.1234123])

plt.show()
(1.89, 2.1100000000000003)