Hi Christoph,
Have you tried setting the backend at the start of your FiPy script like
this?:
importmatplotlib
matplotlib.use('AGG')
This won't make the changes system wide, only for the script. I think
this will work since FiPy doesn't appear to deviate from the default
rcparams setting for the backend.
(https://github.com/usnistgov/fipy/tree/develop/fipy/viewers/matplotlibViewer)
Best,
-Mike
On 3/13/19 9:43 AM, Christoph Margenfeld wrote:
Hello,
as mentioned in the FiPy FAQ, a different Matplotlib backend has to be
used when exporting images from the MatplotlibViewer class without any
output to the screen.
From the Matplotlib documentation (at
https://matplotlib.org/tutorials/introductory/usage.html#what-is-a-backend),
there are three ways to select a backend. The first two would involve
setting it in a .matplotlibrc file or as an environment variable.
However, that would affect all scripts run in that particular
environment, which I do not want to do. The third approach is setting
matplotlib.use('backend').
How can I select a Matplotlib backend for a certain MatplotlibViewer
without affecting any other scripts run from my environment?
Thank you!
Best regards,
Christoph Margenfeld
_______________________________________________
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
_______________________________________________
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]