如何在gnuplot中制作带有边框的框架?

3

我正在尝试为密度图制作一个框架。我从以下内容开始:

set terminal pngcairo size 400,400 enhanced
set output 'test.png'

set view map
unset tics
unset colorbox
set size ratio 1

set border 15 front lw 20
#set border 15 back lw 20

splot sin(sqrt(x**2+y**2))/sqrt(x**2+y**2) w pm3d notitle

enter image description here

如果我使用 front,边框看起来是连续的,但会占用一部分绘图区域。如果我使用back,它不再像一个框架。
如何制作一个合适的框架,使其保持在绘图区域之外?
1个回答

2
使用pngcairo终端的square选项,可能会有所帮助:
set terminal pngcairo size 400,400 enhanced square
set output 'test.png'

set view map
unset tics
unset colorbox
set size ratio 1

set border 15 back lw 20

splot sin(sqrt(x**2+y**2))/sqrt(x**2+y**2) w pm3d notitle

这将产生:

enter image description here

可能还需要稍微增加isosamples,例如:set isosamples 100,以获得更平滑的绘图:

enter image description here


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接