파이썬에서 그래프 그리기
11779 단어 파이썬seabornmatplotlibnumpy
꺾은선형 차트 그리기
이것을 jupyter notebook로 한다고 한다.
터미널에서 수행하면 파일에 그래프를 저장해야합니다. 저장하기 위해서는 plt.savefig("ファイル名")
로 한다.
pyplot으로 그리기
# 数値計算に使うライブラリ
import numpy as np
import pandas as pd
# グラフを描画するライブラリ
from matplotlib import pyplot as plt
# グラフをjupyter Notebook内に表示させるための指定
%matplotlib inline
x = np.array([0,1,2,3,4,5,6,7,8,9])
y = np.array([2,3,4,3,5,4,6,7,4,8])
plt.plot(x, y, color = 'black')
plt.title("lineplot matplotlib")
plt.xlabel("x")
plt.ylabel("y")

seaborn으로 그리기
import seaborn as sns
sns.set()
plt.plot(x, y, color = 'black')
plt.title("lineplot seaborn")
plt.xlabel("x")
plt.ylabel("y")

히스토그램 그리기
data = np.array([2,3,3,4,4,4,4,5,5,6])
sns.distplot(data, bins = 5,
color = 'black', kde = False)

# 数値計算に使うライブラリ
import numpy as np
import pandas as pd
# グラフを描画するライブラリ
from matplotlib import pyplot as plt
# グラフをjupyter Notebook内に表示させるための指定
%matplotlib inline
x = np.array([0,1,2,3,4,5,6,7,8,9])
y = np.array([2,3,4,3,5,4,6,7,4,8])
plt.plot(x, y, color = 'black')
plt.title("lineplot matplotlib")
plt.xlabel("x")
plt.ylabel("y")
import seaborn as sns
sns.set()
plt.plot(x, y, color = 'black')
plt.title("lineplot seaborn")
plt.xlabel("x")
plt.ylabel("y")
data = np.array([2,3,3,4,4,4,4,5,5,6])
sns.distplot(data, bins = 5,
color = 'black', kde = False)

sns.distplot(fish_data, color = 'black' norm_hist=True)

-
norm_hist
에 의해 히스토그램의 면적의 합계가 1이 되도록 세로축이 변경된다.상자 수염 그림
sns.boxplot(x = "species", y = "length",
data = multi, color = 'gray')

바이올린 플롯
커널 밀도 추정 결과를 이용한 것
sns.violinplot(x = "species", y = "length",
data = multi, color = 'gray')

막대 그래프
sns.barplot(x = "species", y = "length",
data = fish_multi, color = 'gray')

산점도
sns.jointplot(x = "x", y = "y",
data = cov_data, color = 'black')

회귀 직선
sns.lmplot(x = "temperature", y = "beer", data = D,
scatter_kws = {"color": "black"},
line_kws = {"color": "black"})

sns.lmplot(x = "price", y = "sales", data = sales,
hue = "weather", palette = "gray")

참고
새로운 파이썬으로 배우는 통계학 교과서 바바 마야
통계학에서 확률 변수의 확률 밀도 함수를 추정하는 비 파라 메트릭 접근법 중 하나. ↩
Reference
이 문제에 관하여(파이썬에서 그래프 그리기), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/kokiMatsuno/items/532240e42b9372fd6de9
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
sns.boxplot(x = "species", y = "length",
data = multi, color = 'gray')
커널 밀도 추정 결과를 이용한 것
sns.violinplot(x = "species", y = "length",
data = multi, color = 'gray')

막대 그래프
sns.barplot(x = "species", y = "length",
data = fish_multi, color = 'gray')

산점도
sns.jointplot(x = "x", y = "y",
data = cov_data, color = 'black')

회귀 직선
sns.lmplot(x = "temperature", y = "beer", data = D,
scatter_kws = {"color": "black"},
line_kws = {"color": "black"})

sns.lmplot(x = "price", y = "sales", data = sales,
hue = "weather", palette = "gray")

참고
새로운 파이썬으로 배우는 통계학 교과서 바바 마야
통계학에서 확률 변수의 확률 밀도 함수를 추정하는 비 파라 메트릭 접근법 중 하나. ↩
Reference
이 문제에 관하여(파이썬에서 그래프 그리기), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/kokiMatsuno/items/532240e42b9372fd6de9
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
sns.barplot(x = "species", y = "length",
data = fish_multi, color = 'gray')
sns.jointplot(x = "x", y = "y",
data = cov_data, color = 'black')

회귀 직선
sns.lmplot(x = "temperature", y = "beer", data = D,
scatter_kws = {"color": "black"},
line_kws = {"color": "black"})

sns.lmplot(x = "price", y = "sales", data = sales,
hue = "weather", palette = "gray")

참고
새로운 파이썬으로 배우는 통계학 교과서 바바 마야
통계학에서 확률 변수의 확률 밀도 함수를 추정하는 비 파라 메트릭 접근법 중 하나. ↩
Reference
이 문제에 관하여(파이썬에서 그래프 그리기), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/kokiMatsuno/items/532240e42b9372fd6de9
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
sns.lmplot(x = "temperature", y = "beer", data = D,
scatter_kws = {"color": "black"},
line_kws = {"color": "black"})
sns.lmplot(x = "price", y = "sales", data = sales,
hue = "weather", palette = "gray")
Reference
이 문제에 관하여(파이썬에서 그래프 그리기), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/kokiMatsuno/items/532240e42b9372fd6de9텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)