如何改善热图的线路质量 [英] How to improve lines quality of a heat map

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

问题描述

我已经画出了这个文件的数字矩阵

I have plotted the matrix of numbers of this file

pher-of-1365.txt

使用此代码

set encoding iso_8859_1
set term postscript eps enhanced color size 4.7in,4in
set xlabel "longitude"
set ylabel "latitude"
set output "test0.eps"
set size square 
set title "Pheromones" font "Helvetica, 16"
set autoscale fix
set key
set yrange [:] reverse
set view map
splot 'pher-of-1365.txt' matrix with image

是哪个情节?

质量还不错,但是线条看起来很模糊.

The quality is not bad but the lines look blurred.

是否可以改善图像中线条的清晰度?

Is there a way to improve the clarity of the lines in the image?

致谢

推荐答案

使用可以尝试使用其他plot语句,并调整点大小以获得更清晰的图像.在4种不同情况下,我在pdf终端上使用了您的脚本:

Use can try to use a different plot statement, and tweak the point size to get a sharper image. I used your script with the pdf terminal, in 4 different cases:

set terminal pdf size 12,12
set output "test0.pdf"
set encoding iso_8859_1

set xlabel "longitude"
set ylabel "latitude"
set size square
set format cb "%2.0t{/Symbol \327}10^{%L}"
set autoscale fix
unset key
set yrange [:] reverse
set view map

set multiplot layout 2,2

set title "plot with image"
splot 'pher-of-1365.txt' matrix with image

set title "plot with points pointtype 5 pointsize 0.45 palette"
splot 'pher-of-1365.txt' matrix with points pointtype 5 pointsize 0.45 palette

set title "plot with points pointtype 5 pointsize 0.25 palette"
splot 'pher-of-1365.txt' matrix with points pointtype 5 pointsize 0.25 palette

set title "plot with points pointtype 3 pointsize 1.25 palette"
splot 'pher-of-1365.txt' matrix with points pointtype 3 pointsize 1.25 palette

结果:

注意事项:

  • 右上方面板上的解决方案起作用的唯一原因是因为您的绘图区域是正方形的,所以我使用了pointtype 5(实心正方形).然后,调整pointsize参数,您可以填充整个区域.请注意,当我更改点的大小和类型时,底部面板上会发生什么.
  • 如评论中所述,正确的实现方式是使用image,因为它可以自行计算事物并填充绘图区域.
  • The only reason the solution on the upper right panel works is because your plotting area is squared, and I used pointtype 5 (filled squares). Then, be tweaking the pointsize param you can fill the entire area. Note what happens on the bottom panels, when I change the size and type on the points.
  • As mentioned in the comments, the right way of doing this is using image, since it will figure things our by itself, and fill in the plotting area.

这篇关于如何改善热图的线路质量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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