Gnuplot热图XYZ [英] Gnuplot heatmap XYZ

查看:841
本文介绍了Gnuplot热图XYZ的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,我想尝试一个真正的热图,例如真热



我的文件类似于

  3 1 2 
3 4 3
3 5 5

4 1 7
4 1 2
4 4 3
4 5 2

5 1 3
5 1 2
5 4 3


..
....

/ p>

使用1:2:3和图像

绘制文件 3 p3md



等。



同样,我也按照这个例子 http://gnuplot.sourceforge.net/demo/heatmaps.html ,但没有。



有人可以在这里散发一些光吗?



感谢

解决方案>

 设置pm3d interpolate 2,2 
splot文件


b $ b

您可以通过更改数字来调整插值级别,或者甚至将其设置为0以告诉gnuplot猜它。 gnuplot使用的插值方法没有很好的记录,所以要小心。

 设置pm3d interpolate 0,0 
splotfile

这里是没有插值的结果:





带插值的结果2,2:





这里是插值0,0的结果:




Hey guys I'm trying to do a real heat map like in A true heat map in R, but in GNUPLOT.

My file is like

3 1 2
3 4 3
3 5 5

4 1 7
4 1 2
4 4 3
4 5 2

5 1 3
5 1 2
5 4 3

.
..
....

and I've tried with

plot "file" using 1:2:3 with image

splot "file" using 1:2:3 p3md

etc..

Also I follow this example http://gnuplot.sourceforge.net/demo/heatmaps.html, but nothing.

Can someone shed some light here please?

Thanks

解决方案

set pm3d interpolate 2,2
splot "file"

You can adjust level of interpolation by changing the number or even set it as 0 to tell gnuplot to "guess" it. It is not well documented what interpolation method that gnuplot is using, so be careful.

set pm3d interpolate 0,0
splot "file"

Here's the result without interpolation:

Here's the result with interpolation 2,2:

Here's the result with interpolation 0,0:

这篇关于Gnuplot热图XYZ的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆