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