Results 26 - 50 of 76 results out of about 490 pages. (0.24 seconds)
- Cookbook/Pyrex_and_NumPy . . . 1 match
- ...|pytables project]] makes extensive use of Pyrex and numarray. See the pytables source code for more ideas.
= See Also =
[[Cookbook/ArrayStruct_and_Pyrex]]
----
CategoryCookbook...
- Cookbook/PIL . . . 1 match
- ...
{{{
>>> import Image
>>> im=Image.open('foo1.png')
>>> a=numpy.array(p)
# do something with a ...
>>> im = Image.fromarray(a)
>>> im.save( 'foo2.png' )
}}}
----
CategoryCookbook...
- Cookbook/OptimizationDemo1 . . . 1 match
- ...
title('Different Bessel functions and their local maxima')
show()
}}}
{{{
#!figure
#class left
inline:NumPyOptimizationSmall.png
Optimization Example
}}}
----
CategoryCookbook...
- Cookbook/Multithreading . . . 1 match
- ...s replaces a for loop.
See attachments for code (written by AMArchibald).
<<AttachList>>
See also ParallelProgramming for alternatives and more discussion.
----
CategoryCookbook...
- Cookbook/MetaArray . . . 1 match
- ... since the actual values are described (name and units) in the column info for the first axis.
=== Contact ===
Luke Campagnola - lcampagn@email.unc.edu
----
CategoryCookbook...
- Cookbook/MayaVi/tvtk . . . 1 match
- ...VTKWithBrowser()``
- ``v = ivtk.IVTKWithCrustAndBrowser)``
For viewers with `Crust` you can use the python command line window to modify the pipeline.
}}}
----
CategoryCookbook...
- Cookbook/MayaVi/Tips . . . 1 match
- ...ved in a !MayaVi2 configuration file, so you'll get these colors each time you run a !MayaVi2 session.
= Writing VTK data files using TVTK =
Coming soon...
----
CategoryCookbook...
- Cookbook/MayaVi/ScriptingMayavi2/MainModules . . . 1 match
- ...is should look like:
{{attachment:module_streamline.png}}
Note: you can also see an example of using the Streamline module in [[Cookbook/MayaVi/Examples]].
----
CategoryCookbook...
- Cookbook/MayaVi/ScriptingMayavi2/Filters . . . 1 match
- ...e !WarpScalar filter to warp a 2D surface for example. See [[Cookbook/MayaVi/Examples| Example using mlab (surf_regular_mlab.py)]].
= TransformData filter =
----
CategoryCookbook...
- Cookbook/MayaVi/ScriptingMayavi2/BasicModules . . . 1 match
- ...about setting parameters modules.
Now, it's time to read the most interesting part: configuring and using modules and filters which interact with your data.
----
CategoryCookbook...
- Cookbook/MayaVi/ScriptingMayavi2 . . . 1 match
- ...ookbook/MayaVi/ScriptingMayavi2/MainModules| Main Modules]] wiki page.
= Filters =
See the [[Cookbook/MayaVi/ScriptingMayavi2/Filters| Filters]] wiki page.
----
CategoryCookbook...
- Cookbook/MayaVi/RunningMayavi2 . . . 1 match
- ...t way to use !MayaVi2. You are recalled here that you can also try ''mayavi2 -h'' to see what options and arguments you can add to the !MayaVi2 command line.
----
CategoryCookbook...
- Cookbook/MayaVi/Examples . . . 1 match
- ...odule(s)
if __name__ == '__main__':
mayavi.new_scene()
d = make_data()
add_data(d)
surf_regular()
}}}
{{attachment:surf_regular_mlab.png}}
----
CategoryCookbook...
- Cookbook/MayaVi . . . 1 match
- ...luding iVTK
{{attachment:5_2_1.png}}
'''Visualization of the (5,2,1) orbital of the H-atom using an iso-surface and a semi-transparant scalar cut plane.'''
----
CategoryCookbook...
- Cookbook/Matplotlib/VTK_Integration . . . 1 match
- ... on my system. I had to change the following line:
fig.set_figsize_inches(w / dpi, h / dpi)
into:
fig.set_figsize_inches(1.0*w / dpi, 1.0*h / dpi)
----
CategoryCookbookMatplotlib...
- Cookbook/Matplotlib/Using_MatPlotLib_in_a_CGI_script . . . 1 match
- ...copyfileobj(open("tempfile.png",'rb'), sys.stdout)
}}}
(Of course it is necessary to create and delete proper temp files to use this in production.)
----
CategoryCookbookMatplotlib...
- Cookbook/Matplotlib/UsingTex . . . 1 match
- ..., explicitly noting any changes to your rc settings, along with what version of matplotlib you have installed, your os, and the --verbose-* output.
----
CategoryCookbookMatplotlib...
- Cookbook/Matplotlib/TreeMap . . . 1 match
- ...om(),random.random())
tree= ((5,(3,5)), 4, (5,2,(2,3,(3,2,2)),(3,3)), (3,2) )
Treemap(tree, iter, size, random_color)
pylab.show()
}}}
----
CategoryCookbookMatplotlib...
- Cookbook/Matplotlib/Transformations . . . 1 match
- ...9,0,4,5)
ax.plot(x,y,'.')
# add labels
trans=offset(ax, 10, 5)
for a,b in zip(x,y):
ax.text(a, b, '(%d,%d)'%(a,b), transform=trans)
show()
}}}
----
CategoryCookbookMatplotlib...
- Cookbook/Matplotlib/SigmoidalFunctions . . . 1 match
- ...eople want to plot, but along with numerix and python, provides the basic tools to enable you to build them yourself.
{{attachment:sigmoids2.png}}
----
CategoryCookbookMatplotlib...
- Cookbook/Matplotlib/Qt_with_IPython_and_Designer . . . 1 match
- ...n.
{{attachment:ipython_interacted.png}}
And, it is very easy to go back to Designer, add a button, re-run pyuic, and you've got another version.
----
CategoryCookbookMatplotlib...
- Cookbook/Matplotlib/Plotting_values_with_masked_arrays . . . 1 match
- ..._test.png')
}}}
The resulting figure might illustrate the problem - note the different scales in all three subplots:
{{attachment:masked_test.png}}
----
CategoryCookbookMatplotlib...
- Cookbook/Matplotlib/Plotting_Images_with_Special_Values . . . 1 match
- ...d then plotting the sentinels in specific colors.
A sample result is shown below.
{{attachment:sentinel_pristine.png}}
{{attachment:sentinel.png}}
----
CategoryCookbookMatplotlib...
- Cookbook/Matplotlib/Multiple_Subplots_with_One_Axis_Label . . . 1 match
- ...t_position((yyl.get_position()[0],1)) # This says use the top of the bottom axis as the reference point.
yyl.set_verticalalignment('center')
----
CategoryCookbookMatplotlib...
- Cookbook/Matplotlib/MultilinePlots . . . 1 match
- ...'-', '_'): set_ygain(1)
connect('key_press_event', keypress)
ax.set_title('Use + / - to change y gain')
show()
}}}
{{attachment:multiline.png}}
----
CategoryCookbookMatplotlib...