Folks- Thanks for the suggestions on my previous post, I managed to
fix the problem by using the min_value keyword to OPLOT, like I said,
very simple.
An aspect of this code that I've had much help from group observers
(Thanks Ben Tupper) in the past is rearing it's ugly head again. The
attached code at the bottom takes the input from three structure
arrays identical to those in my previous post and generates an oblique
3d plane with the value I specify. Here's the problem, the PI's I work
with want to see a volume. So I don't know if I can call the SURFACE
process numerous times for a range of planes to be stacked on each
other or if I need a totally different procedure?
Any suggestions are very appreciated. I call the axes again at the end
to make certain they will plot cleanly.
Patrick
the code:
pro plot3d, event
widget_control, event.top, GET_UVALUE = pstate
; This segment of the procedure plots sigma-t in 3-D
if (event.index eq 1) then begin
print, event.index
device, decomposed=0
x1 = reform((*pstate).profiledata(4,*,0))
y1 = reform((*pstate).profiledata(6,*,0))
x2 = reform((*pstate).profiledata(4,*,1))
y2 = reform((*pstate).profiledata(6,*,1))
x3 = reform((*pstate).profiledata(4,*,2))
y3 = reform((*pstate).profiledata(6,*,2))
Aindex=WHERE(y1 GE 3.9)
Bindex=WHERE(y2 GE 3.9)
Cindex=WHERE(y3 GE 3.9)
; start here
Lon = [0,0,120]
Lat = [0,40,0]
;Depth = [-25, -20, -10]
depthA=(*pstate).profiledata(4,*,0)
depthB= (*pstate).profiledata(4,*,1)
depthC= (*pstate).profiledata(4,*,2)
Depth=[depthA[Aindex[0]], depthB[Bindex[0]], depthC[Cindex[0]]]
LoadCT, 5
Tek_color
Surface, BytArr(2,2), $
xRange = [0,120], $
yRange = [0,40], $
zRange = [30,0], $
/Save, $
Background = 1, Color = 8, $
CharSize = 2.5, $
xtitle='lon', ytitle='lat', ztitle='Depth 2 (m)', $
AX=45, AZ=20, title= 'Sigma-T', $
/nodata
Axis, 0,0,-30, zAxis = 1, Color = 8, zRange = [30,0], $
/T3d, $
CharSize = 2.5, ztitle = 'Depth 1 (m)'
;Axis, 125,40,-30, zAxis = 4, Color = 8, zRange = [30,0], $
; /T3d, $
; CharSize = 2, ztitle = 'Depth4 (m)'
Axis, 120,0,-30, zAxis = 3, Color = 8, zRange = [30,0], $
/T3d, $
CharSize = 2.5, ztitle = 'Depth 3 (m)
Axis, 120,0,-30, yAxis = 1, Color = 0, xRange = [0,40], $
/T3d, xstyle=1, ystyle=1, $
CharSize = 2.5, ytitle= 'Y axis (Latitude)'
Axis, 0,40,-30, xAxis = 1, Color = 0, xRange = [0,120], $
/T3d, xstyle=1, ystyle=1, xtitle='X axis (Longitude)', $
CharSize = 2.5
PolyFill, [Lon,Lon[0]], [Lat, Lat[0]], [Depth, Depth[0]], $
/T3d, /Data, $
Color = 5
PlotS, [Lon,Lon[0]], [Lat, Lat[0]], [Depth, Depth[0]], $
Psym = 6, Color = 5, SymSize = 2, $
/Data, $
/T3d
PlotS, [Lon,Lon[0]], [Lat, Lat[0]], [Depth, Depth[0]], $
Psym = -3, Color = 5, Thick = 2, $
/Data, $
/T3d
;note that this is called last because it will be covered
Axis, 0,0,-30, zAxis = 1, Color = 8, zRange = [30,0], $
/T3d, $
CharSize = 2.5
Axis, 0,40,-30, xAxis = 1, Color = 8, xRange = [0,120], $
/T3d, xstyle=1, ystyle=1, $
CharSize = 2.5
Axis, 120,0,-30, yAxis = 1, Color = 8, xRange = [0,40], $
/T3d, xstyle=1, ystyle=1, $
CharSize = 2.5
endif
|