plt.axis([xmin, xmax, ymin, ymax])
plt.xlim([xmin, xmax])
plt.ylim([ymin, ymax])
畫Max-mean & Min-mean vs dist的圖
import matplotlib.pyplot as plt
fig,ax = plt.subplots()
ax.plot(dist, max_mean, label=”Max-mean”)
ax.plot(dist, min_mean, label=”Min-mean”)
# lisLim = [dist[0],dist[-1],
# max(max_mean),min(min_mean)]
# plt.axis(lisLim)
ax.legend()
plt.minorticks_on()
ax.grid(visible=True,which=”major”,c=”k”,linewidth=1) ;
ax.grid(visible=True,which=”minor”,c=”k”,linewidth=0.5)
tit = “FF Different Position Max or Min – mean “
ax.set_title(tit)
figpath = os.path.join(figFolder, tit+”.png”)
fig.savefig(figpath)
先看103~105註解掉的情況
(會留buffer)
#新增:
lisLim = [dist[0],dist[-1],
max(max_mean),min(min_mean)]
plt.axis(lisLim)
#無buffer:
推薦hahow線上學習python: https://igrape.net/30afN