Fred Weinhaus - 2022-03-30

Is it possible to splot an rgb float format image by channel?

I do not seem to be able to get that to work?

The following works to get the red channel plot:

gnuplot<<EOF
set terminal png medium size 600,500 background rgb "white"
set output "y.png"
set xrange [0:128]
set yrange [0:128] reverse
set zrange [0:1]
set xyplane at 0
set nokey
set border 4095 linecolor rgb "black"
set multiplot layout 1,1
splot "y.rgb" binary array=128x128 format='%f%f%f' flipy every 3:3 using 1:2:3 with lines linetype rgb "red"
unset multiplot
EOF

But the following does not work to get the green channel plot.

gnuplot<<EOF
set terminal png medium size 600,500 background rgb "white"
set output "y.png"
set xrange [0:128]
set yrange [0:128] reverse
set zrange [0:1]
set xyplane at 0
set nokey
set border 4095 linecolor rgb "black"
set multiplot layout 1,1
splot "y.rgb" binary array=128x128 format='%f%f%f' flipy every 3:3 using 1:2:3 with lines linetype rgb "red"
splot "y.rgb" binary array=128x128 format='%f%f%f' flipy every 3:3 using 1:2:4 with lines linetype rgb "green"
unset multiplot
EOF

Can someone help me to get this to work or confirm that it is not possible?

Currently using gnuplot 5.4.2