Back to demo index

gnuplot demo script: argb_hexdata.dem

autogenerated by webify.pl on Sun Sep 17 20:23:41 2023
gnuplot version gnuplot 6.0 patchlevel rc2
#
# test unpacking of integer hex matrix data into an ARGB image
#
$BITS << EOB
0xafffffff 0x3fff0000 0x1f8833aa 0x00ffaa44
0xafff0000 0x3f8833aa 0x1fffaa44 0x00ffffff
0xaf8833aa 0x3fffaa44 0x1f00dddd 0xefffffff
0xafffaa44 0x3fff0000 0x1f8833aa 0x00bb0000
EOB

set pixmap 123 'gradient.png' at screen 0,0 size screen 1,1 behind
set tics 1
unset key
set xrange [-0.5:3.5]; set yrange [-1:3.5]
set title "Alpha+RGB image data loaded from a hexadecimal matrix"

plot 1+2*sin(x*x) lw 4 lc "black", $BITS matrix using 1:2:3 with rgbalpha pixels, \
     $BITS matrix using 1:2:(sprintf("0x%08X",$3)) with labels center font ",12"


Click here for minimal script to generate this plot



set grid x y z vertical
set view 33, 46
splot $BITS matrix using 1:2:(1.0):3 with rgbalpha pixels


Click here for minimal script to generate this plot


reset