Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Gnuplot 从单个数据文件打印多个热图_Gnuplot_Heatmap - Fatal编程技术网

Gnuplot 从单个数据文件打印多个热图

Gnuplot 从单个数据文件打印多个热图,gnuplot,heatmap,Gnuplot,Heatmap,我其实想做一张密度图,但关键词似乎是热图。这是我的问题。我有一个数据文件,看起来像这样:(格式很奇怪,但它是一个12x12的正方形矩阵,每列用空格隔开) 我正试图编写一个脚本,以这些矩阵为基础,为每个矩阵制作一个单独的“热图”。我的问题是,当我运行脚本时,我得到一个错误,说数据不代表网格。另外一个问题是gnuplot读取矩阵的可接受格式是什么 set size ratio 1 set cbrange [0:0.5] set palette defined (0 "red", 1 "blue")

我其实想做一张密度图,但关键词似乎是热图。这是我的问题。我有一个数据文件,看起来像这样:(格式很奇怪,但它是一个12x12的正方形矩阵,每列用空格隔开)

我正试图编写一个脚本,以这些矩阵为基础,为每个矩阵制作一个单独的“热图”。我的问题是,当我运行脚本时,我得到一个错误,说数据不代表网格。另外一个问题是gnuplot读取矩阵的可接受格式是什么

set size ratio 1
set cbrange [0:0.5]
set palette defined (0 "red", 1 "blue")
set autoscale xfix
set autoscale yfix
set xtics 1
set ytics 1
set title "8x8 spin"
set tics scale 0,0.001
set mxtics 2
set mytics 2
set grid front mxtics mytics lw 1.5 lt -1 lc rgb 'white'
plot "densityarrays.d" matrix w image notitle
set term png enhanced
set output "/home/thecollective/Desktop/plots/plot1.png"
replot

你的代码适合我,你使用的是什么操作系统和Gnuplot版本?你能对此发表评论吗?它对我也很管用。否则问题就结束了。唯一的一点是,您应该使用
索引
来选择要绘制的热图,但这是另一个问题。
set size ratio 1
set cbrange [0:0.5]
set palette defined (0 "red", 1 "blue")
set autoscale xfix
set autoscale yfix
set xtics 1
set ytics 1
set title "8x8 spin"
set tics scale 0,0.001
set mxtics 2
set mytics 2
set grid front mxtics mytics lw 1.5 lt -1 lc rgb 'white'
plot "densityarrays.d" matrix w image notitle
set term png enhanced
set output "/home/thecollective/Desktop/plots/plot1.png"
replot