---
aliases:
- /2010/08/switch-to-interactive-backend-with
categories:
- python
date: 2010-08-21 00:33
layout: post
slug: switch-to-interactive-backend-with
title: switch to interactive backend with ipython -pylab
---
objective:
-
when running ipython without pylab or executing scripts you want to use an image matplotlib backend like Agg
-
just when calling ipython -pylab you want to use an interactive backend like GTKAgg or TKAgg
you need first to setup as default backend on .matplotlib/matplotlibrc
Agg
:
backend : Agg
then setup you ipython to switch to interactive, in ipython file Shell.py, in the class MatplotlibShellBase, at about line 516, add:
matplotlib.use('GTKAgg')
after the first import of matplotlib