help: confused about python flavors....

2012-03-06 Thread amar Singh
Hi,

I am confused between plain python, numpy, scipy, pylab, matplotlib.

I have high familiarity with matlab, but the computer I use does not
have it. So moving to python.
What should I use? and the best way to use it. I will be running
matlab-like scripts sometimes on the shell prompt and sometimes on the
command line.

Please help. Thanks in advance.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: help: confused about python flavors....

2012-03-07 Thread amar Singh
On Mar 7, 9:41 am, Dennis Lee Bieber  wrote:
> On Tue, 6 Mar 2012 20:06:37 -0800 (PST), amar Singh
>  declaimed the following in
> gmane.comp.python.general:
>
> > Hi,
>
> > I am confused between plain python, numpy, scipy, pylab, matplotlib.
>
> > I have high familiarity with matlab, but the computer I use does not
> > have it. So moving to python.
> > What should I use? and the best way to use it. I will be running
> > matlab-like scripts sometimes on the shell prompt and sometimes on the
> > command line.
>
>         If Matlab compatibility is a high constraint, I'll speak heresy and
> suggest you might look at Octavehttp://en.wikipedia.org/wiki/GNU_Octave
>
>         Python is stand-alone programming/scripting language. Numpy is an
> extension package adding array/matrix math operations but the syntax
> won't be a direct match to Matlab; Scipy is an extension package that,
> well, extends Numpy. Matplotlib is a separate package for graphical
> plotting of array data. {simplistic explanation}
>
> --
>         Wulfraed                 Dennis Lee Bieber         AF6VN
>         wlfr...@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

Thanks everyone for helping me on this.
-- 
http://mail.python.org/mailman/listinfo/python-list


how to get plots made faster

2012-03-08 Thread 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()
-- 
http://mail.python.org/mailman/listinfo/python-list