본문 바로가기

Datavisualization3

Python 주피터 노트북과 주피터랩의 차이점은 무엇인가요?, What is the difference between Jupyter Notebook and JupyterLab? 질문 I am new to Jupyter Notebook, what is the key difference between the Jupyter Notebook and JupyterLab, suggest me to choose the best one, which should be used in future. 답변 Jupyter Notebook은 Jupyter notebook 문서를 만들기 위한 웹 기반 대화형 계산 환경입니다. Python (IPython), Julia, R 등과 같은 여러 언어를 지원하며, 데이터 분석, 데이터 시각화 및 추가적인 대화형, 탐색적 컴퓨팅에 주로 사용됩니다. JupyterLab은 노트북을 포함한 차세대 사용자 인터페이스입니다. 모듈식 구조를 가지고 있으며, 동일한 창에서 여.. 2023. 12. 7.
Python 그림 제목과 축 라벨의 글꼴 크기를 어떻게 설정하나요?, How do I set the figure title and axes labels font size? 질문 저는 이렇게 Matplotlib에서 그림을 만들고 있습니다: from matplotlib import pyplot as plt fig = plt.figure() plt.plot(data) fig.suptitle('test title') plt.xlabel('xlabel') plt.ylabel('ylabel') fig.savefig('test.jpg') 그림 제목과 축 레이블에 대한 글꼴 크기를 지정하고 싶습니다. 세 가지 모두 다른 글꼴 크기를 가져야 하므로 전역 글꼴 크기(mpl.rcParams['font.size']=x)를 설정하는 것은 원하는 대로 작동하지 않습니다. 그림 제목과 축 레이블에 대한 글꼴 크기를 개별적으로 설정하는 방법은 무엇인가요? 답변 텍스트를 다루는 함수들 (label, t.. 2023. 6. 27.
Python Matplotlib 그림에서 글꼴 크기를 변경하는 방법, How to change the font size on a matplotlib plot 질문 모든 요소 (ticks, labels, title)의 글꼴 크기를 matplotlib 플롯에서 변경하는 방법은 무엇인가요? tick label 크기를 변경하는 방법은 알고 있습니다. 다음과 같이 수행됩니다: import matplotlib matplotlib.rc('xtick', labelsize=20) matplotlib.rc('ytick', labelsize=20) 하지만 나머지는 어떻게 변경하나요? 답변 matplotlib documentation에 따르면, font = {'family' : 'normal', 'weight' : 'bold', 'size' : 22} matplotlib.rc('font', **font) 이렇게 하면 모든 항목의 글꼴이 kwargs 객체에서 지정한 글꼴로 설정됩니.. 2023. 6. 26.