Using Python with the Pencil Code: example #1

Example 1: below is an example about how to plot the 'time_series.dat' file under Python. I assume that you already ran the sample 'conv-slab', as explained in the setup webpage:

pc
go to the PC directory
cd samples/conv-slab
go to the conv-slab sample
ipython -pylab
start a ipython shell with the matplotlib library
pc.read_ts()
read the data/time_series.dat file and plot the results

You will normally obtain this figure: Plot time_series.dat
Numerical Experiments homepage


$Date: 2009-04-23 08:52:11 $, $Author: dintrans $, $Revision: 1.2 $