(→참고) |
|||
48번째 줄: | 48번째 줄: | ||
* https://matplotlib.org/3.1.1/tutorials/introductory/pyplot.html | * https://matplotlib.org/3.1.1/tutorials/introductory/pyplot.html | ||
[[분류: | [[분류: Pyplot]] |
2019년 9월 26일 (목) 01:53 판
1 개요
- Pyplot, matplotlib.pyplot
- 파이플롯
2 화면 출력
Python
Copy
import matplotlib.pyplot as plt
plt.plot([1, 2, 3, 4])
plt.ylabel('some numbers')
plt.show()
Python
Copy
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(0,10,1000)
y = np.power(x,2)
plt.plot(x,y)
plt.title('main title')
plt.xlabel('x')
plt.ylabel('y')
plt.show()
3 PDF 파일로 저장
Python
Copy
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(0,10,1000)
y = np.power(x,2)
plt.plot(x,y)
plt.title('main title')
plt.xlabel('x')
plt.ylabel('y')
plt.savefig('test_plot.pdf')
4 같이 보기
5 참고
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.