这是我参照很多图之后按照自己的审美做的主题
from matplotlib import rcParams
import matplotlib.pyplot as plt
import numpy as np
# %config InlineBackend.figure_formats = ['svg']
# 更改字体字号 10.5=五号字
rcParams['font.size']=10.5
rcParams['svg.fonttype']='none'
rcParams['font.sans-serif']=['Times New Roman']
rcParams['mathtext.fontset']='stix'
rcParams['axes.grid']=True
rcParams['grid.linestyle']='--'
rcParams['xtick.direction']='in'
rcParams['ytick.direction']='in'
示例代码
from scipy.special import jn as BesselJ
x=np.linspace(0,10,60)
plt.figure(figsize=(10*50./127,6*50./127)) # 图像尺寸10x6cm
plt.axhline(0,color='black',lw=1)
for n in range(4):
y=BesselJ(n+1,x)
plt.plot(x,y)
plt.fill_between(x,0,y,alpha=0.1)