Back to demo index

gnuplot demo script: rgbalpha.dem

autogenerated by webify.pl on Thu Nov 15 12:12:31 2018
gnuplot version gnuplot 5.2 patchlevel 5
set border linecolor rgb "gold"
set key title "Plot style rgbalpha" textcolor rgb "gold" 
set key bottom left at screen .75, screen .75
set key Left width -7 sample 1

set object  1 rect from screen 0, 0 to screen 1, 1 behind \
              fc rgb "gray10"  fillstyle  solid 1.00 noborder
set samples 128, 128
set size ratio 0.95
set bmargin at screen .1
set tmargin at screen .9
set lmargin at screen .1


set xrange [ 0. : 128. ] 
set yrange [ 0. : 128. ]

# Alpha =  linear gradient on x

plot 100.*(.4+sin(x/5.)/(x/5.)) lw 5 title 'solid line', \
     'lena.rgb' binary array=(128,128) format="%uchar" flipy using 1:2:3:(2.*column(0)) \
                with rgbalpha title "Lena with linear\nalpha gradient"


Click here for minimal script to generate this plot




# Alpha = circular mask

focus(x,y) = ((column(0)-x)**2 + (column(-1)-(127-y))**2) > 400 ? 0 : 255

plot 100.*(.4+sin(x/5.)/(x/5.)) lw 5 title 'solid line', \
     'lena.rgb' binary array=(128,128) format="%uchar" flipy using 1:2:3:(focus(70,50)) \
                with rgbalpha title "Lena with circular mask"


Click here for minimal script to generate this plot