Re: How to make a ribbon plot [message #30410] |
Thu, 25 April 2002 09:19 |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
It seems you have a few options. IDLgrSurface objects, mesh_obj "extrude" +
IDLgrPolygon, and as David mentioned Streamline.
I think the easiest would be creating many Surface objects and specifying
x,y, and z accordingly. You'll have to do some work to get your data into
the correct format but once you work out the details it should be easy.
say you have a 2d array of data, each column you wish to plot as a ribbon:
pro ribbon_plot, data, colors, model, container
width = 2.5
space = 1.0
s = size(data, /dimensions)
surf_array = objarr(s[0])
container -> add, surf_array
for n=0, s[0]-1 do begin
z = [data[n,*], data[n,*]]
x = [n * (width + space), (n * (width + space)) + width]
y = findgen(s[1])
surf_array[n] = obj_new('idlgrsurface',z, x, y, color=colors[*,n], $
style=2)
endfor
model -> add, surf_array
model -> rotate, [1,0,0], -90.
end
I left a lot of room for style points but this should get you started.
-Rick
"Brian Bell" <sailfalmouth@yahoo.com> wrote in message
news:f65c611a.0204240732.2a78f30@posting.google.com...
> I want to make a ribbon plot in a 3D graph. Should I use SURFACE
> objects to create it? I basically want to make some planes that are
> perpendicular to the xy plane and parallel to either the xz plane or
> the yz plane. Any help with this would be greatly appreciated. Thank
> you,
>
> Brian
|
|
|
Re: How to make a ribbon plot [message #30418 is a reply to message #30410] |
Wed, 24 April 2002 20:11  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Brian Bell (sailfalmouth@yahoo.com) writes:
> I want to make a ribbon plot in a 3D graph. Should I use SURFACE
> objects to create it? I basically want to make some planes that are
> perpendicular to the xy plane and parallel to either the xz plane or
> the yz plane. Any help with this would be greatly appreciated. Thank
> you,
It's not clear to me what you are trying to do,
but have you had a look at the STREAMLINE command?
That is suppose to draw ribbon plots.
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|