0
0

More than 3 years have passed since last update.

matplotlibによるグラフ描画方法

Last updated at Posted at 2020-05-14

import matplotlib.pyplot as plt
plt.rcParams['font.family'] = 'IPAexGothic'
plt.figure(figsize=(1.5, 1.5))

fig = plt.figure(figsize=(5, 5))
ax = fig.add_subplot(1, 1, 1)

#散布図
plt.scatter(x, y)

#ヒストグラム
plt.hist(y, bins=5)

#棒グラフ
plt.bar(x, y)

#折れ線グラフ
plt.plot(x, y)

#箱ひげ図
plt.boxplot(y)


#xラベルを回転
plt.xticks(rotation= )

#積み上げグラフ
bottom=で指定してやれば良い

#テキストの入力
plt.text(x座標,y座標,文字)
#ここでの座標は、グラフの軸の数値

https://qiita.com/katuemon/items/5c4db01997ad9dc343e0
文字化け対策の記事

https://qiita.com/skytomo221/items/8f07734a63a3e7c15860
Jupyter関係

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0