我想要绘制与同一文件的不同数据列相关的多个图,但我想要每个图都有一个新窗口。我不想要与该命令关联的附加图set multiplot layout 1,2。这个想法由以下伪代码表示:
>gnuplot
>plot "myfile.txt" u 1:4
>#make me plot another file without deleting the previous one i.e. open a new window on which data is plotted
>instructions I don't know
>plot "myfile.txt" u: ($3*$3)
>#I obtain two windows
Run Code Online (Sandbox Code Playgroud)
您不必写出您正在使用哪个终端。我知道您希望有两个彼此相邻的窗口,而不是磁盘上的两个图形文件。在 gnuplot 控制台中检查例如:help wxt. 如果您想要磁盘上有两个文件,则必须选择另一个终端,例如
set term pngcairo
set output 'myOutput1.png'
plot x
set output 'myOutput2.png'
plot x**2
set output
Run Code Online (Sandbox Code Playgroud)
因此,使用交互式 wxt 终端,以下内容对我有用:
代码:
### several terminals
reset session
set term wxt 1 size 500,400
plot sin(x)
set term wxt 2 size 500,300
plot cos(x)
set term wxt 3 size 300,200
plot x**2
### end of code
Run Code Online (Sandbox Code Playgroud)
结果: