21
18

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 5 years have passed since last update.

Jupyter Notebookでmatplotlibのグラフが表示されない

Last updated at Posted at 2017-07-14

サークルで統計が流行っているのですが、みんなRを使うのでひねくれものの私はPythonでデータサイエンスを勉強しています。(Rもそのうち触りたい)

そんな中、matplotlibがインライン展開されないという問題にぶちあたったのでメモ。

解決策

ノートのはじめで以下のコードを走らせないとインライン展開されないみたいですね。

%matplotlib inline

Before

In  [48] : tz_counts[:10].plot(kind='barh', rot=0)
Out [48] : <matplotlib.axes._subplots.AxesSubplot at 0x18dd7d8c358>

After

In  [49] : %matplotlib inline
In  [50] : tz_counts[:10].plot(kind='barh', rot=0)
Out [50] : <matplotlib.axes._subplots.AxesSubplot at 0x18dd7d8c358>

20170402160818.png

表示されるよ!やったねたえちゃん!

21
18
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
21
18

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?