我知道我们可以使用unset键省略GNUplot中的键.如果我想插入一个小图像来表示XY 2-D图上的键,该怎么做?在MS-Excel中,只需复制图像并将其粘贴到绘图上并调整其位置和大小即可.这样的事情也可以在GNUPlot中完成吗?通过什么情节选项?我在我制作的多重图中附加了一个我期望的样本(左上图).我将小分子图像作为png文件.我还列出了下面的代码.请帮我.谢谢.
reset
set size 1,1
set multiplot
unset key
#CPD
set size 0.5,0.5
set origin 0,0.5
unset title
plot 'Practice1.dat' using 1:2 w points lw 3 lc rgb 'red'
plot 'Practice1.dat' using 1:6 smooth csplines lw 3 lc rgb 'red'
#Ethene
set size 0.5,0.5
set origin 0.5,0.5
set title 'Ethene'
plot 'Practice1.dat' using 1:3 w l lw 3 lc rgb 'blue'
#Benzene
set size 0.5,0.5
set origin 0,0
set title 'Benzene'
plot 'Practice1.dat' using 1:4 smooth csplines lw 3 lc rgb 'green'
#H2
set size 0.5,0.5
set origin 0.5,0
set title 'H2'
plot 'Practice1.dat' using 1:5 w l lw 3 lc rgb 'black'
Run Code Online (Sandbox Code Playgroud)
该图像本身就是一个情节。
plot "image.png" binary filetype=png center=(975,40) dx=200 w rgbimage, \
'Practice1.dat' using 1:2 w points lw 3 lc rgb 'red', \
'Practice1.dat' using 1:6 smooth csplines lw 3 lc rgb 'red'
Run Code Online (Sandbox Code Playgroud)
请注意,您应该避免使用多个绘图命令而不更改多图中的原点/大小,因为标签和边框被覆盖,这可能会根据终端改变它们的外观(例如抗锯齿),因此命令的使用和,分割多行(与\)
另请注意,这set multiplot可能已经为您完成了简单 2x2 绘图的布局,set multiplot layout 2,2