%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
x = range(100)
y = [val**2 for val in x]
plt.plot(x,y)#plotting x and y
输出效果:
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
x = range(100)
y = [val**2 for val in x]
plt.plot(x,y)#plotting x and y
输出效果: