I'm using the plot 'my_image.png' binary filetype=png with rgbimage feature of gnuplot to superimpose images on a (scarce) scatterplot.
My png's have a transparent background, so I had been hoping that they could 'respect' the grid and axes, but unfortunately they are plotted on top of it with a white, opaque background.
Is there any ways to address this issue ?
The file 2091450.png is provided by First Google result for Transparent PNG :
set terminal pdfcairo font "CMU Serif" linewidth 4 rounded \
fontscale 1.0 size 29.7cm, 21cm enhanced dashed
set output 'transparency_test.pdf'
set style line 81 lt rgb "#808080"
set style line 80 lt 0 # dashed
set style line 80 lt rgb "#808080" # grey
set grid back linestyle 80
set border 3 back linestyle 81
plot '2091450.png' binary filetype=png origin=(0,0) dx=1.0 dy=1.0 with rgbimage
Several things:
Your links gives me only a jpg image despite the URL name (If it would be transparent, you would get only a completely black image as result with the rgbimage style).
To plot images with transparency use the rgbalpha plotting style:
plot 'transparencytest.png' binary filetype=png with rgbalpha
I used the following file transparencytest.png for testing, which works fine:

Why don't you just put the grid and the border to the front layer?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With