Skip to content Skip to sidebar Skip to footer

Pyplot "cannot Connect To X Server Localhost:10.0" Despite Ioff() And Matplotlib.use('agg')

I have a piece of code which gets called by a different function, carries out some calculations for me and then plots the output to a file. Seeing as the whole script can take a wh

Solution 1:

The calling function calls other functions too which also use matplotlib. These get called only after this one but during the import statement their dependecies get loaded. Seeing as they were loaded first they disabled the subsequent matplotlib.use('Agg') declaration. Moving that declaration to the main script has solved the problem.


Post a Comment for "Pyplot "cannot Connect To X Server Localhost:10.0" Despite Ioff() And Matplotlib.use('agg')"