티스토리 뷰
plot
- 가장 기본적인 그래프는 라인그래프로, 별도의 그래프 형태 지정이 없다면 라인 그래프로 그려짐
스타일 옵션
color
색 이름 또는 약자 사용
표시 | 의미 |
b | blue |
g | green |
r | red |
c | cyan |
m | magenta |
y | yellow |
k | black |
w | white |
marker
마커 설정이 없으면 그래프는 실선으로 그려짐
표시 | 의미 |
. | point marker |
, | pixel marker |
o | circle marker |
v | triangle_down marker |
^ | triangle_up marker |
< | triangle_left marker |
> | triangle_right marker |
1 | tri_down marker |
2 | tri_up marker |
3 | tri_left marker |
4 | tri_right marker |
s | square marker |
p | pentagon marker |
* | star marker |
h | hexagon1 marker |
H | hexagon2 marker |
+ | plus marker |
x | x marker |
D | diamond marker |
d | thin_diamond marker |
예시
line style
선 스타일 설정이 없으면 그래프가 기본 실선으로 표시됨
표시 | 의미 |
선을 긋지않고 marker로만 표시 | |
- | solid line style |
-- | dashed line style |
-. | dash-dot line style |
: | dotted line style |
예시
그 외 스타일 옵션
linewidth (lw) : 선 굵기
markersize (ms) : 마커 사이즈
markeredgecolor(mec) : 마커 테두리 색상
markeredgewidth(mew) : 마커 테두리 선 굵기
markerfacecolor(mfc) : 마커 내부 색상
예시
plt.plot(x,y, 'b1:')
plt.show()
plt.plot(x, y,
color="darkblue",
linewidth=1,
linestyle="-.",
marker="o",
ms=10,
mec="m",
mew=1,
mfc="w")
plt.show()
참고
matplotlib.pyplot.plot — Matplotlib 3.8.2 documentation
An object with labelled data. If given, provide the label names to plot in x and y. Note Technically there's a slight ambiguity in calls where the second label is a valid fmt. plot('n', 'o', data=obj) could be plt(x, y) or plt(y, fmt). In such cases, the f
matplotlib.org
'데이터 시각화' 카테고리의 다른 글
[matplotlib 그래프 튜토리얼] 06. 그래프 (pie) (0) | 2023.12.28 |
---|---|
[matplotlib 그래프 튜토리얼] 05. 그래프 (bar) (0) | 2023.12.28 |
[matplotlib 그래프 튜토리얼] 04. 그래프 (subplot, multi-line) (0) | 2023.12.28 |
[matplotlib 그래프 튜토리얼] 03. plot (figure) (0) | 2023.12.28 |
[matplotlib 그래프 튜토리얼] 02. plot (style.context, with) (1) | 2023.12.28 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- iOS 화면 안나옴
- iOS 데이터베이스
- django pythoneverywhere
- CellForRowAt 호출안됨
- 장고 태그달기
- 테이블출력안됨
- 실시간 데이터베이스
- 까만 화면
- 웹 배포
- django 태그
- django 개발일지
- django tag
- Firebase 데이터베이스 추천
- 알파벳 카운팅
- 장고 게시판
- django 로그인접근
- python 웹 배포
- iOS UITableView 출력안됨
- 데이터베이스 추천
- django clean
- Realtime Database
- pythonanywhere배포
- CellForRowAt Not Called
- ModelForm Form 차이
- iOS 검은 화면
- UITableViewController Not Working
- django 게시판
- pythonanywhere배포방법
- cleaned_data
- Django
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
글 보관함