Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #21419 > unrolled thread
| Started by | amar Singh <jagteraho2006@gmail.com> |
|---|---|
| First post | 2012-03-08 20:40 -0800 |
| Last post | 2012-03-09 06:01 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.python
how to get plots made faster amar Singh <jagteraho2006@gmail.com> - 2012-03-08 20:40 -0800
Re: how to get plots made faster Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-03-09 06:01 +0000
| From | amar Singh <jagteraho2006@gmail.com> |
|---|---|
| Date | 2012-03-08 20:40 -0800 |
| Subject | how to get plots made faster |
| Message-ID | <5415ca7c-ccc4-4ec3-a118-4674e54038a7@b18g2000vbz.googlegroups.com> |
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()
[toc] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2012-03-09 06:01 +0000 |
| Message-ID | <mailman.529.1331272909.3037.python-list@python.org> |
| In reply to | #21419 |
On 09/03/2012 04:40, amar Singh wrote:
> 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
--
Cheers.
Mark Lawrence.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web