On 2010-07-09 15:12:02 +0200, Gael Varoquaux said:

> I hate having people stuck. If you have specific suggestions for better 
> documentation, I very gladly take them.

OK, here are some suggestions and questions to the documentation of the 
surf function:

> s is the elevation matrix, a 2D array.

Fine.

> x and y can be 1D or 2D arrays (such as returned by numpy.ogrid or 
> numpy.mgrid), but the points should be located on an orthogonal grid 
> (possibly non-uniform). In other words, all the points sharing a same 
> index in the s array need to have the same x or y value. For 
> arbitrary-shaped position arrays (non-orthogonal grids), see the mesh 
> function.

Quite confusing, why does it not matter if x or y are 1D or 2D arrays? 
What happens in either case? Can I mix it? (x as 1D , y as 2D)?
I don't understand 'sharing a same index in the s array', respectively 
the 'need to have'.
Do you mean: All permutations between the given x and y array points 
are made, and only when they exacly represent a coordinate of the s 
array, that value is taken and being drawn?
If you could explain this to me, I am quite willing to work on doc 
improvements. Obviously I need to understand it well for that to 
happen. ;)
But maybe we should communicate this outside the list now?

BR,
Michael

> 
> Gael
> 
> ----- Original message -----
> > On 2010-07-09 09:51:09 +0200, Gael Varoquaux said:
> >
> > > On Fri, Jul 09, 2010 at 09:42:03AM +0200, K.-Michael Aye wrote:
> > > > This 2nd way I have tried many times, as I am working completely in
> > > > numpy arrays, but I always get flat object, like this:
> > > > http://dl.dropbox.com/u/139035/snapshot.png
> > >
> > > Ah, you need to use:
> > >
> > > mlab.surf(img, warp_scale='auto')
> > >
> > > Right now, the z scaling (also called 'warp_scale') is calculated in
> > > the same units than (x, y) pixels.
> >
> > Ahhh, NOW I understand that sentence! ;)
> > What happened is, that my pixel values (=luminance) were around 0.1,
> > which created a surface plot of the height of around 0.1 pixels, i.e. :
> > flat.
> >
> > Thanks for making it click! But maybe one could improve the description
> > of the z-scaling a bit better, improve clarity and maybe to include
> > this little number example with 0.1 as pixel values? I have the feeling
> > it would help all newbies to understand how to do the scaling.
> >
>> BR,
>> > Michael
>> >
>> > >
>> > > HTH,
>> > >
>> > > Gaƫl
>> > >
>> > > 
>> ------------------------------------------------------------------------------
> 
>> 
>> > This SF.net email is sponsored by Sprint
>> > > What will you do first with EVO, the first 4G phone?
>> > > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
>> >
>> >
>> >
>> >
>> > 
>> ------------------------------------------------------------------------------
> 
>> 
>> This SF.net email is sponsored by Sprint
>> > What will you do first with EVO, the first 4G phone?
>> > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
>> > _______________________________________________
>> > MayaVi-users mailing list
>> > MayaVi-users@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/mayavi-users
>> 
>> 
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by Sprint
>> What will you do first with EVO, the first 4G phone?
>> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
>> _______________________________________________
>> MayaVi-users mailing list
>> MayaVi-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mayavi-users




------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
MayaVi-users mailing list
MayaVi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users

Reply via email to