Computer >> 컴퓨터 >  >> 프로그램 작성 >> Python

Matplotlib의 factorplot에서 선폭과 markersize를 개별적으로 변경하는 방법은 무엇입니까?

<시간/>

factorplot에서 linewidth와 markersize를 별도로 변경하려면 다음 단계를 사용할 수 있습니다. -

  • 그림 크기를 설정하고 서브플롯 사이 및 주변 여백을 조정합니다.
  • 온라인 리포지토리에서 예제 데이터세트를 로드합니다.
  • factorplot() 사용 규모가 있는 방법 마커 크기를 변경합니다.
  • 그림을 표시하려면 show()를 사용하세요. 방법.

예시

import seaborn as sns
from matplotlib import pyplot as plt

plt.rcParams["figure.figsize"] = [7.50, 3.50]
plt.rcParams["figure.autolayout"] = True

exercise = sns.load_dataset("exercise")

g = sns.factorplot(x="time", y="pulse", hue="kind", data=exercise, ci=95,
                  markers=['o', '*', 'd'],
                  scale=1, height=7.0)

plt.show()

출력

Matplotlib의 factorplot에서 선폭과 markersize를 개별적으로 변경하는 방법은 무엇입니까?