首页 > 解决方案 > Gnuplot 密度映射

问题描述

我有一组带有 x 和 y 坐标的点。我想绘制特定区域中点的密度,输出类似于热图。可以使用gnuplot吗?

标签: gnuplotgnuplot-iostream

解决方案


这可能不是最好的解决方案,但这是我以前做的。

我希望你有数据文件data.dat,其中有数据输入

x       y       z
1.486   1.528   779666
1.487   1.528   673036
1.488   1.528   565025
.       .       .
.       .       .

现在使用以下命令进行绘图。

set hidden3d
set dgrid3d 50,50 qnorm 2
set view map
splot 'data_file' u 1:2:3 palette pt 5 ps 1.5

设置点大小ps满足您的数据需求。


推荐阅读