엑셀 그래프 공부할 때는 정말 편했다. 그래프 그리는 방법이 한가지로 통일되어있으니 그냥 책보고 따라하면서 공부하면 그만이다. 머리아플일도 없었는데 파이썬을 공부하면서는 라이브러리도 한개가 아닌데 심지어 같은 matplotlib을 쓰는데 누구는 plt.xlabel~ 이런식으로하고 누구는 ax.set_~~이런식으로 하고 왜 이렇게 할까 궁금해서 찾아봤다
https://hwi-doc.tistory.com/entry/matplotlib-%EC%99%84%EB%B2%BD-%EC%A0%95%EB%A6%AC
matplotlib 완벽 정리
데이터 분야 공부를 시작할때 가장 먼저 만나는 세 가지 라이브러리를 꼽자면 numpy, pandas, matplotlib 입니다. 오늘은 그 중 matplotlib 에 대해서 정리해볼텐데요, 개인적으로 처음 이 라이브러리를 접
hwi-doc.tistory.com
왜 import matplotlib.pyplot 하는지도 알게된다.
fig, ax 방식이 stateless API
plt 방식이 stateful API
https://towardsdatascience.com/what-are-the-plt-and-ax-in-matplotlib-exactly-d2cf4bf164a9
What Are the “plt” and “ax” in Matplotlib Exactly?
Plotting on a paper, or in a cell on the paper
towardsdatascience.com
두개의 차이에 대해 설명해준다. plt방식은 cell이라는걸 안그리는데 fig방식은 cell을 그린다. 그래프가 1개면 상관없는데
다중그래프에서 뭐 차이가 있다 그런내용..
Why do many examples use `fig, ax = plt.subplots()` in Matplotlib/pyplot/python
I'm learning to use matplotlib by studying examples, and a lot of examples seem to include a line like the following before creating a single plot... fig, ax = plt.subplots() Here are some exampl...
stackoverflow.com
What is the difference between drawing plots using plot, axes or figure in matplotlib?
I'm kind of confused what is going at the backend when I draw plots in matplotlib, tbh, I'm not clear with the hierarchy of plot, axes and figure. I read the documentation and it was helpful but I'm
stackoverflow.com
https://www.skytowner.com/explore/getting_started_with_matplotlib
Getting Started with Matplotlib
nums = [1,1,2,3,3,3,3,3,4,5,6,6,6,7,8,8,9,10,12,12,12,12,14,18] _ = plt.hist(nums) _ = plt.xlabel('Number') _ = plt.ylabel('Frequency') plt.show()
www.skytowner.com
'파이썬 > 궁금한것' 카테고리의 다른 글
해결 : pip install pyreadstat 패키지깔아도 spss,sav 못읽음 (0) | 2022.08.03 |
---|---|
해결) seaborn col로 groupby했을때, plt.xticks설정하면 마지막 그래프만 바뀜 (0) | 2022.07.20 |
해결) plt.rcParams['lines.color'] = 'red' 안되는 이유 (0) | 2022.07.10 |
궁금) mpl(matplotlib)과 plt(matplotlib.pyplot)의 차이점? (0) | 2022.07.09 |
해결) DataFrame에서 int64 자료형 숫자 천의단위마다 ,찍고 싶은데 어떡하는지 (0) | 2022.07.02 |