[Python]Matplotlib 그래프 그리기 팁(사이즈, subplot, 주석


[Python]Matplotlib 그래프 그리기 팁(사이즈, subplot, 주석

목차 파이썬 matplotlib을 사용하기 위해서는 pip install matplotlib으로 설치를 우선 진행하여야 합니다. 아래는 matplotlib을 효과적으로 사용하기 위한 팁과 트릭입니다. Plot 크기 조절하기 plot의 크기는 figure의 figsize로 x축과 y축 사이즈를 결정 합니다. 예제 코드>> import matplotlib.pyplot as plt import random fig=plt.figure(figsize=(4,4)) x=list(range(10)) y=[random.random() for _ in x] print(x) print(y) plt.title("graph title") plt.xlabel('x-axis') plt.ylabel('y-axis') plt.plot..


원문링크 : [Python]Matplotlib 그래프 그리기 팁(사이즈, subplot, 주석