import matplotlib.pyplot as plt
import numpy as np #그림좌표
fig, ax = plt.subplots() #
x = np.linspace(0, 2, 100)
fig, ax = plt.subplots()
ax.plot(x, x, label='linear') # 축 설명
ax.plot(x, x**2, label='quadratic')
ax.plot(x, x**3, label='cubic')
ax.set_xlabel('x label')
ax.set_ylabel('y label')
ax.set_title("Simple Plot")
ax.legend()
plt.show()

'python > Matplotlib' 카테고리의 다른 글
| pyplot (0) | 2021.07.19 |
|---|---|
| Splitting lines into smaller chunk (0) | 2021.07.19 |
| [<matplotlib.lines.Line2D object at 0x7f1c6c06dd30>] (0) | 2021.07.19 |
| 좌표 생성 (0) | 2021.07.19 |
| 좌표 생성 (0) | 2021.07.19 |