【发布时间】:2014-05-12 13:23:40
【问题描述】:
我正在使用 gnuplot 的 plot 'my_image.png' binary filetype=png with rgbimage 功能将图像叠加在(稀缺的)散点图上。
我的 png 有一个透明背景,所以我一直希望它们能够“尊重”网格和轴,但不幸的是,它们被绘制在它上面,并带有白色、不透明的背景。
有没有办法解决这个问题?
最小的工作示例
文件2091450.png由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
【问题讨论】:
-
这个页面描述了如何获得透明背景,并告诉你一些可能出错的事情:gnuplot-surprising.blogspot.co.uk/2011/09/…。试试帮助命令,
help transparent。
标签: gnuplot