Closed and-tos closed 6 years ago
Are you ssh-ing into a remote machine when calling this code?
Yes, indeed I am. I am running HTMD on a Cluster.
Unless you ssh -XY
you will not be able to open plots remotely. You would need to pass plot=False
to plotTimescales
to disable the plotting but then you probably don't really that command anyway
I tried plot=False and save='file' to save the image without displaying it, but this did not work either. I'll have a look into the ssh option. I am actually using ThinLinc to work on the front node.
I believe this is unrelated with HTMD per se, i.e. it's not an HTMD bug.
@andt88 is the output the same when using plot=False
and save=file
?
Yes, I get the same error.
@stefdoerr does savefig
function of matplotlib use X? That's the only way the error would be the same.
https://matplotlib.org/faq/howto_faq.html#matplotlib-in-a-web-application-server I think we use Agg, right?
No we don't. This is the solution if you want to save plots through ssh. Set the backend to agg
On September 3, 2018 1:48:56 PM GMT+03:00, "João M. Damas" notifications@github.com wrote:
https://matplotlib.org/faq/howto_faq.html#matplotlib-in-a-web-application-server I think we use Agg, right?
-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/Acellera/htmd/issues/767#issuecomment-418077498
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
OK.
@andt88 use this:
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
it should fix your issue
Should be the first thing in your script. Before importing anything else.
On September 3, 2018 2:17:10 PM GMT+03:00, "João M. Damas" notifications@github.com wrote:
OK.
@andt88 use this:
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt
it should fix your issue
-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/Acellera/htmd/issues/767#issuecomment-418084124
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
When running
I get the following error: