1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
#
# splot with boxes
# Note: 3D boxes are implemented via the pm3d code so in order to
# get proper occlusion of far-away boxes by nearer ones you must use
# "set pm3d depthorder" rather than "set hidden3d"
# In version 5 it was also necessary to use
# "set pm3d border lc black" rather than "set style fill border lc black"
# but this is not true in the current version.
#
set boxwidth 0.4 abs
set xyplane at 0
set grid z vertical lw 1.0
set yrange [0:6]
set view 59, 24
set pm3d border lc black
set style fill solid 1.0 border lc black
rgbfudge(x) = x*51*32768 + (11-x)*51*128 + int(abs(5.5-x)*510/9.)
ti(col) = sprintf("%d",col)
set title '3D Boxes'
splot for [col=5:4:-1] 'candlesticks.dat' using 1:(col):col \
with boxes title ti(col)
pause -1 "hit return to continue"
set title 'lc variable (from column 1)'
splot for [col=5:4:-1] 'candlesticks.dat' using 1:(col):col:1 \
with boxes title ti(col) lc variable
pause -1 "hit return to continue"
set title 'lc rgb variable'
splot for [col=5:4:-1] 'candlesticks.dat' using 1:(col):(col*column(col)):(rgbfudge($1)) \
with boxes title ti(col) linecolor "black" fillcolor rgb variable
pause -1 "hit return to continue"
set title "transparent boxes with imperfect depth sorting"
unset key
set style fill transparent solid 0.7
set pm3d depthorder
set grid x y z vertical
splot for [col=1:5] 'candlesticks.dat' using 1:(col):(col*column(col)):(rgbfudge($1)) \
with boxes fc rgb variable
pause -1 "hit return to continue"
set title "give the boxes a 3D depth and correct depth sorting"
set style fill solid
set boxdepth 0.3
set pm3d depthorder base
set walls z0
replot
pause -1 "hit return to continue"
set title 'Full treatment: 3D boxes with pm3d depth sorting and lighting'
set pm3d lighting
replot
pause -1 "hit return to continue"
reset
|