LoginSignup
2
0

More than 5 years have passed since last update.

ipythonでベン図を描こうと思ったらImportError

Last updated at Posted at 2017-03-24

とある分析でベン図を使用して複数の要素の関連性を見ようと思い、テストやるためにipythonを起動して

#!/usr/bin/env python3
import pylab as plt
from matplotlib_venn import venn3, venn3_circles

v = venn3(subsets=(1,1,0,1,0,0,0))
v.get_label_by_id('100').set_text('First')
v.get_label_by_id('010').set_text('Second')
v.get_label_by_id('001').set_text('Third')
plt.title("Not a Venn diagram")
plt.show()

を実行したら

ImportError: No module named 'matplotlib_venn'

anacondaで全部入れてたと思ってたら、どうやら「matplotlib_venn」は入っていなかった様子

なのでipythonを一旦閉じて、cmdで

pip install matplotlib_venn

でインストールし、もう一度実行しなおしたらいけました。

pip install 便利~

って思ったらベンズのcirclesってMAXでも3つまでなんだ。。。。

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