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

Home » Public Forums » archive » 3D plotting
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
3D plotting [message #51190] Tue, 07 November 2006 21:18
Eric[3] is currently offline  Eric[3]
Messages: 1
Registered: November 2006
Junior Member
Hello,

I'm trying to find the most efficient way to make a 3D plot. I'm
going into my plot code with 5 variables, r_x, r_y, r_z, count and
color_scale.

r_x, r_y and r_z are arrays with the data points, count is the number
of points to plot and color_scale is an array of colors for each point.
The way I'm doing it right now (using XPLOT3D) is taking A LONG time
to plot (around 230 data points) and is also very difficult to rotate
the plot the way I want after it is already created. I tried using
iPlot, but it doesn't seem to like me using an array with a color
from a color table (it seems to prefer RGB?). Is there a way of doing
this in iPlot? Any other suggestions are welcome as well.

The code:


x = fltarr(300) & y = fltarr(300) & z = fltarr(300)

thisPalette = Obj_New('IDLgrPalette')
thisPalette->LoadCT, 34


for ii = 0, count-1 do begin

oOrb = obj_new('RHTgrPSolid', /TETRAHEDRON,
color=color_scale[ii])
oOrb -> GetProperty, OBJECT=pObj
oOrb -> SetProperty, palette=thispalette
oSymbol = OBJ_NEW('IDLgrSymbol', pObj)
x[ii] = r_x[ii]
y[ii] = r_y[ii]
z[ii] = r_z[ii]
XPLOT3D, x, y, z, xrange=[-10, 10], yrange=[-10, 10],
zrange=[-10,10], linestyle=6, SYMBOL=oSymbol, THICK=2, /OVERPLOT

endfor



Thanks in advance,
Eric
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: error reading file question
Next Topic: Concatenate arrays of different dimensions

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

Current Time: Wed Oct 08 19:23:52 PDT 2025

Total time taken to generate the page: 0.00516 seconds