[Python] matplotlib - axvspan, hatch ๋ฉด์ , ํจํด ๊ทธ๋ฆฌ๊ธฐ
import numpy as np import matplotlib.pyplot as plt t = np.arange(-1, 3, .01) s = np.sin(2.5 * np.pi * t) plt.plot(t, s) plt.axvspan(1.25, 1.55, facecolor='red', edgecolor='gold', alpha=0.5, hatch='///') plt.show() https://matplotlib.org/3.1.3/api/_as_gen/matplotlib.pyplot.axvspan.html matplotlib.pyplot.axvspan — Matplotlib 3.1.3 documentation Parameters: xmin : scalar Number indicating the first..