Hello,
I'm trying to reproduce what was very simple in xplot3d in plot3d and
having all kinds of trouble.
Basically, I am plotting clusters of particles, using a symbol set to
a sphere as each spherule. In xplot3d I could simply write:
; Define particle positions and radius
x = [-3,-2,-1,0,0,0,0,0,0,0,1,2,3]
y = [0,0,0,-3,-2,-1,0,1,2,3,0,0,0]
z = fltarr(n_elements(x))
r = 0.5
range = [min([x,y,z])-r, max([x,y,z])+r]
; Define plotting symbol and scale.
orb = obj_new('orb', COLOR=[40, 40, 40])
orb->Scale, r, r, r
oSymbol = obj_new('IDLgrSymbol', orb)
; Plot
xplot3d, x,y,z, linestyle=6, symbol=oSymbol,
xrange=range,yrange=range,zrange=range
With this, because I scale the orb to the radius of my spherule, it
plots at the correct size. However, because plot3d appears to scale
relative to the height/width of the window, I cannot get the symbol
size correct and it's driving me crazy!
New attempt:
new_orb = obj_new('orb',color = [40, 40, 40] )
new_orb->scale, r, r, r
p = plot3d(x,y,z,linestyle=6, /isotropic, sym_object=new_orb, sym_size
= 1 )
Changing the sym_size and the scaling does not give obvious results...
Does anyone know how to set the correct symbol size (i.e. so that the
radius of a sphere is set to my variable r)?
Cheers,
Andy
|