ax.plot, linestyle, 그래프 선 유형 설정, python(파이썬), matplotlib
ax.plot을 사용해서 그래프를 그릴때, 나타낼 수 있는 그래프 선의 유형은 다음과 같다. 1. solid 2. dotted 3. dashed 4. dashdot 기본적인 사용방법은 다음과 같다. (dotted를 예로 함) ax.plot(x축 데이터, y축 데이터, linestyle = 'dotted') import numpy as np import matplotlib.pyplot as plt ### 데이터 정의 ### x_arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] y_arr = [1, 4, 9, 16, 25, 25, 25, 64, 81, 100] ### 데이터 시각화 ### fig, ax = plt.subplots(figsize = (20, 20), nrows = 2, nco..
2024. 4. 4.