3D plotting [message #51190] |
Tue, 07 November 2006 21:18 |
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
|
|
|