Alternative pour la modification de l'option backend

parent 066b908f
......@@ -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`.
---
---
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment