2017-02-21 122 views
1

我有x和y数据点表示一个星团。我想使用Gnuplot及其重叠点的散射函数来显示密度。Gnuplot:散点图和密度

我用下面的命令:

set style fill transparent solid 0.04 noborder 
set style circle radius 0.01 
plot "data.dat" u 1:2 with circles lc rgb "red" 

结果:

enter image description here

不过,我想这样的事情

enter image description here

这有可能在gnuplot的?有任何想法吗?

回答

1

它是一个选项后处理与imagemagick图像?

# convert into a gray scale image 
convert source.png -colorspace gray -sigmoidal-contrast 10,50% gray.png 

# build the gradient, the heights have to sum up to 256 
convert -size 10x1 gradient:white-white white.png 
convert -size 10x85 gradient:red-yellow \ 
        gradient:yellow-lightgreen \ 
        gradient:lightgreen-blue \ 
     -append gradient.png 
convert gradient.png white.png -append full-gradient.png 

# finally convert the picture 
convert gray.png full-gradient.png -clut target.png 

我还没有尝试,但我很确定gnuplot可以直接绘制灰度图像。

这里是(旋转)梯度图像: rotated gradient

这是结果: colored scatter plot

+0

尼斯替代!但我真的需要Gnuplot的解决方案。 – Samuel