Saturday, 15 February 2014

python - How to "switch to one of the Agg backends"? -



python - How to "switch to one of the Agg backends"? -

i have same problem this problem, namely when using matplotlib , networkx on mac os x 10.8.5, labels not displayed.

the solution in thread "switching 1 of agg based backends should 'resolve' problem avoiding it" @tcaswell here. can tell me means/ how it?

i'm sorry start new thread, don't have plenty reputation comment or inquire questions on previous post! if merge post , previous, best.

thanks bobby

this should work (note use needs called before pyplot imported):

import matplotlib matplotlib.use('agg') import matplotlib.pyplot plt

there more details in other questions if search "agg" or "backend", e.g. this one.

edit: sorry, maybe didn't understand trying do. sebix points out, agg backend plotting file (i.e. non-interactive plots), , if want interactive plot appear on screen, utilize 1 of interactive backends. e.g. qt4agg (note needs pyqt4).

python osx matplotlib networkx

No comments:

Post a Comment