(새 문서: ==개요== ;matplotlib.pyplot <source lang='python'> 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 ti...) |
Jmnote bot (토론 | 기여) 잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight )) |
||
(다른 사용자 한 명의 중간 판 14개는 보이지 않습니다) | |||
1번째 줄: | 1번째 줄: | ||
==개요== | ==개요== | ||
;matplotlib.pyplot | {{소문자}} | ||
;Pyplot, matplotlib.pyplot | |||
;파이플롯 | |||
< | {{소스헤더|짧은 테스트 코드}} | ||
<syntaxhighlight lang='python' run> | |||
import matplotlib.pyplot as p;p.boxplot((1));p.show() | |||
</syntaxhighlight> | |||
==화면 출력== | |||
<syntaxhighlight lang='python' run> | |||
import matplotlib.pyplot as plt | |||
plt.plot([1, 2, 3, 4]) | |||
plt.ylabel('some numbers') | |||
plt.show() | |||
</syntaxhighlight> | |||
<syntaxhighlight lang='python' run> | |||
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() | |||
</syntaxhighlight> | |||
==PDF 파일로 저장== | |||
<syntaxhighlight lang='python'> | |||
import numpy as np | import numpy as np | ||
import matplotlib.pyplot as plt | import matplotlib.pyplot as plt | ||
12번째 줄: | 40번째 줄: | ||
plt.xlabel('x') | plt.xlabel('x') | ||
plt.ylabel('y') | plt.ylabel('y') | ||
plt. | plt.savefig('test_plot.pdf') | ||
</ | </syntaxhighlight> | ||
==같이 보기== | ==같이 보기== | ||
* [[matplotlib]] | * [[matplotlib]] | ||
[[분류: | ==참고== | ||
* https://matplotlib.org/tutorials/introductory/pyplot.html | |||
* https://matplotlib.org/3.1.1/tutorials/introductory/pyplot.html | |||
[[분류: Pyplot]] |
2021년 3월 14일 (일) 17:00 기준 최신판
1 개요[ | ]
- Pyplot, matplotlib.pyplot
- 파이플롯
짧은 테스트 코드
Python
Copy
import matplotlib.pyplot as p;p.boxplot((1));p.show()
Loading
2 화면 출력[ | ]
Python
Copy
import matplotlib.pyplot as plt
plt.plot([1, 2, 3, 4])
plt.ylabel('some numbers')
plt.show()
Loading
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()
Loading
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
로그인하시면 댓글을 쓸 수 있습니다.