我正在使用Gnuplot 4.6.5
我想将z值写入热图图。
这是产生热图的代码:
#
# Two ways of generating a 2D heat map from ascii data
#
set title "Heat Map generated from a file containing Z values only"
unset key
set tic scale 0
# Color runs from white to green
set palette rgbformula -7,2,-7
set cbrange [0:5]
set cblabel "Score"
unset cbtics
set xrange [-0.5:1.5]
set yrange [-0.5:1.5]
set view map
plot '-' using 1:2:3 with image
0 0 5
0 1 4
1 0 2
1 1 2
e
这给出:
我想在图中写出z值:
我的实际数据比这里使用的演示数据大得多。因此,手动编写每个点几乎是不切实际的。
任何帮助,将不胜感激。
您可以labels
为此使用绘图样式。另请参阅gnuplot矩阵或图:显示颜色和点值,这是一个非常类似的问题:
unset key
set palette rgbformula -7,2,-7
set cbrange [0:5]
set cblabel "Score"
unset cbtics
set autoscale fix
plot '-' using 1:2:3 with image, \
'-' using 1:2:(strcol(3)) with labels
0 0 5
0 1 4
1 0 2
1 1 2
e
0 0 5
0 1 4
1 0 2
1 1 2
e
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句