我这里画的是6次方的抛物线
代码如下:
#coding:utf-8
import matplotlib.pyplot as plt
import numpy as np
plt.rcParams['font.family'] = ['SimHei']
plt.rcParams['axes.unicode_minus'] = False
x = np.linspace(-10,10,50)
y = x ** 6
plt.plot(x,y,'ro-')
plt.title("抛物线")
plt.xlabel("xtick")
plt.ylabel("voltage")
plt.show()