Mittwoch, 4. März 2015

plot an image transparently with gnuplot

The standard way to plot a image in gnuplot is the following:
plot x
plot 'test.png' binary filetype=png with rgbimage 



with several filetypes, like jpg, png and so on. But if you want to have this image transparent you need to choose rgbalpha instead of rgbimage and use u 1:2:3:(alpha-value) with the alpha-value ranging between 0:255 as follows:

plot x
replot 'test.png' u 1:2:3:($4*0.5) binary filetype=png with rgbalpha 


Keine Kommentare:

Kommentar veröffentlichen