python 绘制抛物线
%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
输出效果: