how to get plots made faster

A

amar Singh

The following is the part of my code which is running faster locally
and more slowly remotely via ssh on the same machine. Note I am trying
to generate a multi-page report.


## create plots and write to a pdf file
from scipy import *
import matplotlib.pyplot as plt
from matplotlib.backends.backend_pdf import PdfPages

# open a multi-page pdf file
pp = PdfPages('history_plot.pdf')

F=loadtxt('hist.dat',comments='%')


t=F[:,0]
E=F[:,13]

plt.plot(t,E)

h1=plt.ylabel('Energy', fontsize=16)
h1=plt.xlabel('Time', fontsize=16)
pp.savefig()

plt.clf()
VdotB=F[:,14]
plt.plot(t,VdotB)

pp.savefig()
pp.close()
 
M

Mark Lawrence

The following is the part of my code which is running faster locally
and more slowly remotely via ssh on the same machine. Note I am trying
to generate a multi-page report.


## create plots and write to a pdf file
from scipy import *
import matplotlib.pyplot as plt
from matplotlib.backends.backend_pdf import PdfPages

# open a multi-page pdf file
pp = PdfPages('history_plot.pdf')

F=loadtxt('hist.dat',comments='%')


t=F[:,0]
E=F[:,13]

plt.plot(t,E)

h1=plt.ylabel('Energy', fontsize=16)
h1=plt.xlabel('Time', fontsize=16)
pp.savefig()

plt.clf()
VdotB=F[:,14]
plt.plot(t,VdotB)

pp.savefig()
pp.close()

I can't help directly but you may be better off asking on the matplotlib
users mailing list see
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top