1
1

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.

matplotlibのbackendを変更する

Last updated at Posted at 2019-05-06

備忘録としてmatplotlibのbackendの変更方法を残しておきます.

現在のbackendを確認する

デフォルトのbackendは,matplotlibrcに記述されています.
matplotlibrcの居場所はpythonを実行して,以下のコマンドを打つことで確認できます.

>>> import matplotlib
>>> matplotlib.matplotlib_fname()

次に,matplotlibrc内で以下のようにbackendが設定されている箇所を探します.

backend      : Qt4Agg

backendを変更する

最後に,matplotlibrcを以下のように変更することでbackendを変更できます.

# backend      : Qt4Agg
backend      : TkAgg
1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?