티스토리 뷰
with plt.style.context()
matplotlib 에서는 with 구문을 사용해서 그래프 전체 스타일을 변경 가능함
그래프 스타일 조회
그래프 스타일을 조회할 수 있음
print(plt.style.available)
>> ['Solarize_Light2', '_classic_test_patch', '_mpl-gallery', '_mpl-gallery-nogrid', 'bmh', 'classic', 'dark_background', 'fast', 'fivethirtyeight', 'ggplot', 'grayscale', 'seaborn-v0_8', 'seaborn-v0_8-bright', 'seaborn-v0_8-colorblind', 'seaborn-v0_8-dark', 'seaborn-v0_8-dark-palette', 'seaborn-v0_8-darkgrid', 'seaborn-v0_8-deep', 'seaborn-v0_8-muted', 'seaborn-v0_8-notebook', 'seaborn-v0_8-paper', 'seaborn-v0_8-pastel', 'seaborn-v0_8-poster', 'seaborn-v0_8-talk', 'seaborn-v0_8-ticks', 'seaborn-v0_8-white', 'seaborn-v0_8-whitegrid', 'tableau-colorblind10']
예시
x = np.array([10, 20, 30, 40, 50, 60, 70, 80])
y = np.array([1, 3, 5, 7, 9, 11, 13, 15])
with plt.style.context('seaborn-v0_8-bright'):
plt.title('seaborn-v0_8-bright')
plt.plot(x, y, color="darkblue", linewidth=1, linestyle="-.", marker="o", ms=10, mec="m", mew=1, mfc="w")
plt.show()








'데이터 시각화' 카테고리의 다른 글
[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 그래프 튜토리얼] 01.plot (스타일 옵션) (1) | 2023.12.27 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- CellForRowAt 호출안됨
- 실시간 데이터베이스
- pythonanywhere배포방법
- iOS 검은 화면
- iOS UITableView 출력안됨
- 장고 게시판
- UITableViewController Not Working
- iOS 화면 안나옴
- cleaned_data
- 데이터베이스 추천
- django pythoneverywhere
- 장고 태그달기
- pythonanywhere배포
- python 웹 배포
- Django
- Firebase 데이터베이스 추천
- 까만 화면
- 웹 배포
- django 게시판
- CellForRowAt Not Called
- django tag
- django 로그인접근
- django 개발일지
- 알파벳 카운팅
- Realtime Database
- iOS 데이터베이스
- django clean
- ModelForm Form 차이
- 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 |
글 보관함