0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Google Colaboratory の matplotlib で日本語を使う方法

Posted at

インストール、インポート

!pip install japanize-matplotlib
import matplotlib.pyplot as plt
import japanize_matplotlib 

!pip install japanize-matplotlib
import matplotlib.pyplot as plt
import japanize_matplotlib 
import numpy
from scipy.stats import norm
a_05, a_95 = norm.interval(alpha=0.95)
x_value = 4
x = numpy.linspace(x_value * -1 , x_value, 1000)
x_95 = numpy.linspace(a_95, x_value, 100)
x_05 = numpy.linspace(x_value * -1, a_05, 100)
plt.plot(x, norm.pdf(x))
plt.fill_between(x_95, 0, norm.pdf(x_95), facecolor='lightskyblue', alpha=1)
plt.fill_between(x_05, 0, norm.pdf(x_05), facecolor='lightskyblue', alpha=1)
plt.text(0, 0.45, r'正規分布 両側検定の棄却域(有意水準5%)',horizontalalignment='center')
plt.xlim(x_value * -1, x_value)
plt.ylim(0, 0.5)
plt.show()

matplotlib.png

0
2
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
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?