2013-01-25 4 views
1

Quand je lance ce code simple:terrain python n'affiche une fenêtre sur ubuntu

import matplotlib.pyplot as plt 
plt.plot([1,2,3,4]) 
plt.ylabel('some numbers') 
plt.show() 

Je ne reçois pas de fenêtre. J'ai essayé de l'enregistrer dans le fichier et cela fonctionne, mais je veux afficher la fenêtre avec l'intrigue sur l'écran. J'utilise python version 2.7.3. Et je travaille sur Ubuntu.

Comment afficher la fenêtre/l'intrigue?

+2

vérifiez votre backend dans le fichier de configuration 'matplotlibrc' – theta

Répondre

0

Avez-vous installé numpy? matplotlib nécessite une version numpy 1.4 ou ultérieure. Vous pouvez obtenir les étapes d'installation à partir de here

+0

Cela n'a rien à voir avec la question. – tiago