how to get plots made faster

amar Singh jagteraho2006 at gmail.com
Thu Mar 8 23:40:57 EST 2012


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()



More information about the Python-list mailing list