On Thu, Oct 3, 2013 at 6:35 AM, ajdcds <ajd...@hotmail.com> wrote:

> Sorry, of course it does not work, the import is incorrect!
>
> It should be
>
> import matplotlib as plt
> plt.rcParams['backend'] = 'TkAgg'
>
> or simply
> import matplotlib
> matplotlib.rcParams['backend'] = 'TkAgg'
>
>
Errr... no, don't do "import matplotlib as plt". That is just confusing.

To change backends, do the following:

import matplotlib
matplotlib.use("TkAgg")

Because backends are loaded upon import of matplotlib, changing the rcParam
after importing matplotlib is too late. You force a switch of the backend
via the "use()" function.
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to