[SciPy-user] surface plotting
Mon Dec 3 14:43:21 CST 2007
> Sure. Tell us a bit more about your usecase. Do you want to produce
> figures for print/publication, do you want to interact with your data, or
> do you want simply to do some 3D plotting in a program of yours. You can
> do all this with Mayavi, but the solutions will depend a bit of your usecase.
Well, seen that you ask, I often run thermo-hydraulic simulations.
I usually end up having a set of numerical values to plot on a
non-trivial domain rather than an analytical function.
This can sometimes be done using a contour plot in matplotlib, but I am
also looking for alternatives.
For instance, let us say that I want to plot some scalar (say a
component of the velocity) on the cross section of a tube (I simply
generate random numbers here; in reality I would read it from a file).
With pylab, this is what I would do:
#! /usr/bin/env python
from scipy import *
#print "theta is ", theta
print 'OK up to here'
X = rsin_t.transpose()
Y = rcos_t.transpose()
Z = vel_section.transpose()
velmin = vel_section.min()
velmax = vel_section.max()
print velmin, velmax
levels = arange(velmin, velmax+0.01, 0.1)
pylab.contourf(X, Y, Z, levels, cmap=pylab.cm.jet)
Can I do something similar with mayavi? And how?
> > DeprecationWarning: ScipyTest is now called NumpyTest; please update
> > your code
>> My main interest is point (1), i.e. to be sure that my python
>> installation is still OK (and know what to do in case it is not).
> I think it is OK. What happened is that scipy got updated, and these are
> just harmless, albeit annoying, warnings.
Here I am a bit puzzled. True, SciPy 0.6.x has recently been released,
but on my box (Debian testing) I am still running 0.5.2 and I do not
recall it having been updated recently...or have I missed it?
Many thanks and good luck with the defense of your PhD thesis.
More information about the SciPy-user