comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » PLOT3D format input
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: PLOT3D format input [message #90622 is a reply to message #90621] Tue, 17 March 2015 20:17 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Matthew Argall writes:

>
>> t=FINDGEN(5,200)
>> x = t(1,*)
>> y = t(2,*)
>> z = t(3,*)
>>
>> p = PLOT3D(x, y, z,'o')
>
>
> I have found that function graphics are particularly picky about whether you pass them a column vector or row vector. Problems arise when you pass data in as a row vector (a 1xN array, as you are doing above). The solution is to reform your data into a column vector (Nx1 array), like so
>
> x = reform(t[1,*])
> y = reform(t[2,*])
> z = reform(t[3,*])
>
> p = plot3d(x, y, z, 'o')

Actually, visa versa, but we get the idea. :-)

x = t[1,*] is a column vector.
y = Reform(t[2,*]) is a row vector.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ring in fg graphics
Next Topic: IDL Array Indices Command

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:36:46 PDT 2025

Total time taken to generate the page: 0.00374 seconds