diff --git a/documents/tuto_emacs_windows/tuto_emacs_windows.md b/documents/tuto_emacs_windows/tuto_emacs_windows.md index 8b816bed67e1399f80830341524cc5984b7b0965..447a1f319ea952be31d42901821cd62825fbb3f8 100644 --- a/documents/tuto_emacs_windows/tuto_emacs_windows.md +++ b/documents/tuto_emacs_windows/tuto_emacs_windows.md @@ -59,7 +59,8 @@ python -m pip install -U matplotlib - Désactiver les plots interactifs dans matplotlib -Pour ce faire, il faut d'abord savoir où se trouve le fichier de configuration de matplotlib sous Windows. +Pour ce faire, il faut d'abord savoir où se trouve le fichier de configuration +de `matplotlib` sous Windows. Exécuter le code suivant sous Python @@ -90,6 +91,18 @@ Si vous devez passer d'un logiciel à l'autre, je suggère d'avoir deux fichiers `matplotlibrc`, un avec la ligne `backend: TkAgg` et un autre avec la ligne `backend: Agg`. +Une alternative est de conserver l'option `backend: TkAgg` dans le fichier +`matplotlibrc` et de définir l'option `backend` avant le chargement de `pyplot` : + +``` +import matplotlib +matplotlib.use('Agg') +from matplotlib import pyplot as plt +``` + +Il est bien sûr possible d'ajouter les deux lignes dans la définition du +raccourci `>PP` dans le fichier `init.el`. + --- ---