comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: histogram 3D
items: Re: histogram 3D

histogram 3D
type: item
description: Dear: I love programing in IDL, and I would like to plot a 3D histogram like this http://cloud.originlab.com/www/resources/graph_gallery/image s_galleries_new/3DBarsWithZColorMap_opengl.png do you think is it possible? Some suggestions for starting? Thanks guys Fher
creator: fvelarde6
date: 2016-11-23T13:42:03-00:00

Re: histogram 3D
type: item
description: On Wednesday, 23 November 2016 05:42:05 UTC-8, fvel...@gmail.com wrote: > Dear: > I love programing in IDL, and I would like to plot a 3D histogram like this > http://cloud.originlab.com/www/resources/graph_gallery/image s_galleries_new/3DBarsWithZColorMap_opengl.png > > do you think is it possible? Some suggestions for starting? > Thanks guys > Fher Hi Fher, Yes, I think it's possible, and not terribly difficult. Here's a start: PRO Histogram3DDisplay n = 10 w = 1 ; 0.9999 oAxes = ObjArr(3) oBoxes = ObjArr(n, n) oFrames = ObjArr(n, n) FOR axisI=0, 2 DO oAxes[axisI] = IDLgrAxis(axisI, RANGE=[0, n]) ; Connectivity list for a rectangular solid: poly = [4,0,1,5,4,4,1,2,6,5,4,2,3,7,6,4,3,0,4,7,4,3,2,1,0,4,4,5,6,7 ] FOR x=0, n-1 DO FOR y=0, n-1 DO BEGIN z = RandomU(seed) * n color = [RandomU(seed)*256, RandomU(seed)*256, RandomU(seed)*256] verts = [[x+w,y+w,0],[x,y+w,0],[x,y,0],[x+w,y,0], $ ; Bottom face [x+w,y+w,z],[x,y+w,z],[x,y,z],[x+w,y,z]] ; Top face oBoxes[x, y] = IDLgrPolygon(verts, POLYGONS=poly, ALPHA_CHANNEL=0.75, $ COLOR=color) oFrames[x, y] = IDLgrPolygon(verts, POLYGONS=poly, STYLE=1) ENDFOR ; Default colorbar has x size of 24, y size of 256 oColorbar = Obj_New('IDLgrColorbar', /SHOW_OUTLINE, /SHOW_AXIS, /THREED) oColorbarModel = IDLgrModel() oColorbarModel.Add, oColorbar oColorbarModel.Scale, n/256., n/256., n/256. ; Scale to match plot size oColorbarModel.Translate, n*1.5, 0, 0 ; Shift to right of plot XObjView, [oAxes, oBoxes[*], oFrames[*]], STATIONARY=oColorbarModel END ; Notes: ; ; I find that I have to click the window to get the display to draw ; (might be just on my setup). ; ; If you change window size, click the Reset button in the toolbar to set ; display axes right. ; ; Do View:Set Drag Quality:High for full-motion goodness. ; ; Note that the semi-transparency looks better from some angles than others, ; due to how transparency rendering is handled (don't be surprised if some ; old-timers chime in, saying something about pimentos). Reordering th…
creator: Dick Jackson
date: 2016-11-23T20:00:34-00:00

Re: histogram 3D
type: item
description: On Wednesday, November 23, 2016 at 1:00:37 PM UTC-7, Dick Jackson wrote: > On Wednesday, 23 November 2016 05:42:05 UTC-8, fvel...@gmail.com wrote: >> Dear: >> I love programing in IDL, and I would like to plot a 3D histogram like this >> http://cloud.originlab.com/www/resources/graph_gallery/image s_galleries_new/3DBarsWithZColorMap_opengl.png >> >> do you think is it possible? Some suggestions for starting? >> Thanks guys >> Fher > > Hi Fher, > > Yes, I think it's possible, and not terribly difficult. Here's a start: > > PRO Histogram3DDisplay > > n = 10 > w = 1 ; 0.9999 > > oAxes = ObjArr(3) > oBoxes = ObjArr(n, n) > oFrames = ObjArr(n, n) > > FOR axisI=0, 2 DO oAxes[axisI] = IDLgrAxis(axisI, RANGE=[0, n]) > > ; Connectivity list for a rectangular solid: > poly = [4,0,1,5,4,4,1,2,6,5,4,2,3,7,6,4,3,0,4,7,4,3,2,1,0,4,4,5,6,7 ] > > FOR x=0, n-1 DO FOR y=0, n-1 DO BEGIN > > z = RandomU(seed) * n > color = [RandomU(seed)*256, RandomU(seed)*256, RandomU(seed)*256] > > verts = [[x+w,y+w,0],[x,y+w,0],[x,y,0],[x+w,y,0], $ ; Bottom face > [x+w,y+w,z],[x,y+w,z],[x,y,z],[x+w,y,z]] ; Top face > oBoxes[x, y] = IDLgrPolygon(verts, POLYGONS=poly, ALPHA_CHANNEL=0.75, $ > COLOR=color) > oFrames[x, y] = IDLgrPolygon(verts, POLYGONS=poly, STYLE=1) > ENDFOR > > ; Default colorbar has x size of 24, y size of 256 > oColorbar = Obj_New('IDLgrColorbar', /SHOW_OUTLINE, /SHOW_AXIS, /THREED) > oColorbarModel = IDLgrModel() > oColorbarModel.Add, oColorbar > oColorbarModel.Scale, n/256., n/256., n/256. ; Scale to match plot size > oColorbarModel.Translate, n*1.5, 0, 0 ; Shift to right of plot > > XObjView, [oAxes, oBoxes[*], oFrames[*]], STATIONARY=oColorbarModel > > END > > ; Notes: > ; > ; I find that I have to click the window to get the display to draw > ; (might be just on my setup). > ; > ; If you change window size, click the Reset button in the toolbar to set > ; display axes right. > ; > ; Do View:Set Drag Quality:High for full-motion goodness. > ; > ; Note that the semi-transparency …
creator: Jim Pendleton
date: 2016-11-23T23:21:18-00:00