##// END OF EJS Templates
Cleaned up release tools directory....
Cleaned up release tools directory. Converted almost all to python scripts and made toollib to collect common functions and avoid repetition. Properly commented and documented what each script does. The run_ipy_in_profiler one seems broken, I'm not sure what to do with it. We need to either fix it or remove it later, but it's not critical for 0.10.

File last commit:

r1338:72652d65
r2118:ec9810f7
Show More
plotting_frontend.py
51 lines | 1.2 KiB | text/x-python | PythonLexer
/ docs / examples / kernel / plotting_frontend.py
Brian E Granger
Adding examples from ipython1-dev to docs/examples/kernel. These ...
r1337 """An example of how to use IPython1 for plotting remote parallel data
The two files plotting_frontend.ipy and plotting_backend.py go together.
To run this example, first start the IPython controller and 4
engines::
ipcluster -n 4
Then start ipython in pylab mode::
ipython -pylab
Then a simple "run plotting_frontend.ipy" in IPython will run the
example. When this is done, all the variables (such as number, downx, etc.)
are available in IPython, so for example you can make additional plots.
"""
import numpy as N
from pylab import *
Brian E Granger
Fixed most of the examples. A few still don't work, but this is a start.
r1338 from IPython.kernel import client
Brian E Granger
Adding examples from ipython1-dev to docs/examples/kernel. These ...
r1337
# Get an IPython1 client
rc = client.MultiEngineClient()
rc.get_ids()
# Run the simulation on all the engines
rc.run('plotting_backend.py')
# Bring back the data
number = rc.pull('number')
d_number = rc.pull('d_number')
downx = rc.gather('downx')
downy = rc.gather('downy')
downpx = rc.gather('downpx')
downpy = rc.gather('downpy')
print "number: ", sum(number)
print "downsampled number: ", sum(d_number)
# Make a scatter plot of the gathered data
# These calls to matplotlib could be replaced by calls to pygist or
# another plotting package.
figure(1)
scatter(downx, downy)
xlabel('x')
ylabel('y')
figure(2)
scatter(downpx, downpy)
xlabel('px')
ylabel('py')
show()