728x90

가장 단순한 plt.subplots()

 

여러개 플롯 생성 없이 사용.

 

import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(0, 2*np.pi, 400)
y = np.sin(x**2)

# Create just a figure and only one subplot
fig, ax = plt.subplots()
ax.plot(x, y)
ax.set_title('Simple plot')

plt.show()

300x250

+ Recent posts