matlab搞的双坐标轴折线图不太满意,花了一天时间用python搞出来的还行。
以前用python绘图写过非线性动力学作业,一年没用了全忘光光嘿嘿嘿
import matplotlib.pyplot as plt
import numpy as np
from pylab import *
mpl.rcParams['font.sans-serif'] = ['SimHei'] # 处理中文字符
%matplotlib inline
%config InlineBackend.figure_format = 'svg' # 矢量图
theta = np.arange(0, 80, 12.5)
xiaolv = [38.63, 39.31, 40.21, 40.49, 43.22, 40.1, 41.27]
xishu = [0.985, 1.0133, 1.0462, 1.0619, 1.1503, 1.0634, 1.0985]
fig = plt.figure()
ax = fig.add_subplot(111) # 布局方式
lns1 = ax.plot(theta, xiaolv, 'o-', label = '效率'+ r'$\eta$'