Thursday, 1 December 2011

If matplotlib complains about the backend in OS X...

If matplotlib works fine, but will crash or give errors whenever it's supposed to plot a graph, even with a simple instruction as:

import matplotlib.pyplot as plt 

it is likely that there is a problem with the backend that is being used.

Edit the file:


(create it if it doesn't exist)

and add the line:

backend: MacOSX