a quick way to plot 3D surface with point coordination?

Hi, All,

I have a bunch of 3D points with coordinations in a dict
pointset = {
(x1,y1):z1,
(x2,y2):z2,
...
}

It seems I have to
1. fire a loop to change each item and convert the whole dictionary into arrays;
x = []
y = []
for i in pointset.items():
    x.append(i[0][0])
    y.append(i[0][1])

2. send x and y ranges to meshgrid
3. loop again to put z values into proper positions
4. use plot_surface()

Is there any quicker ways to do that?

And we know that for points with coordination, scatter must be the
simplest way to visualize them.
Is there any trick to convert a scatter graph into a surface picture directly?

Appreciation for any ideas.

Zhe Yao

···

--------------
Department of Computer and Electrical Engineering
McGill University
Montreal, QC, Canada
H3A 2A7

zhe.yao@...3048...

Does this mean you have the entire grid of points?
In any case, you can get an array of your points
as np.array([(x,y,z) for (x,y),z in d.iteritems()])

fwiw,
Alan Isaac

···

On 3/31/2010 10:40 PM, ericyosho wrote:

send x and y ranges to meshgrid

2010/4/1 ericyosho <ericyosho@...287...>:

And we know that for points with coordination, scatter must be the
simplest way to visualize them.
Is there any trick to convert a scatter graph into a surface picture directly?

I'm afraid not, because one needs an algorithm to infer the connectivity :frowning:

Friedrich