我正在绘制gnuplot中的图形,并希望以全屏和特定大小打开它们.
以前,我一直在多色模式下输出图形并使用重读来更新它们; 因此,当我手动最大化时,绘图会在几次迭代后填满屏幕.现在,我还想将输出保存为文件.当我打开该文件时,它与原始多画面输出的大小相同.但是,当我最大化它时,绘图的大小不会增加以填充屏幕.我有两个问题:
这是我当前的gnuplot代码(在一个名为gnuplotCode的文件中):
set terminal pngcairo dashed enhanced
set output 'foo.png'
set multiplot layout 3, 3
plot for [iter=1:9] path/to/file using 1:(column(iter)) notitle
unset multiplot
unset output
pause 10
reread
Run Code Online (Sandbox Code Playgroud)
我试图键入以下内容:
gnuplot -geometry -3360-1050 gnuplotCode # where my screen size is 3360x1050
Run Code Online (Sandbox Code Playgroud)
和:
resolution=$(xrandr | grep '*') && resolution=${resolution% *}
gnuplot -geometry $resolution gnuplotCode
Run Code Online (Sandbox Code Playgroud)
但这两种方法都不奏效 请问您能告诉我如何以全屏和特定大小打开gnuplots吗?谢谢.
我正在gnuplot(版本4.6补丁级别5)多色模式中绘制图形,这些模式正在使用重读进行更新.
set multiplot layout 3, 3
do for [planeIter=4:10:3] for [ringIter=0:20:10] {
plot for [quadIter=0:90:30] path/to/file \
using 1:(column(1 + planeIter + ringIter + quadIter)) notitle
}
pause 10
reread
Run Code Online (Sandbox Code Playgroud)
以前,我输出了png文件:
set terminal pngcairo dashed enhanced
plot path/to/file using 1:2
set output 'foo.png'
Run Code Online (Sandbox Code Playgroud)
但我一直无法找到如何输出最新多画面屏幕的文件.请你告诉我怎么做到这一点?谢谢.
我想将文件名作为变量输入到 GNUplot 中。我编写了一个 gnuplot 脚本,其中包括以下几行:
path="path/to/file"
plot "< cat $path | sed '1,4d'" using 1:2
Run Code Online (Sandbox Code Playgroud)
当我运行脚本时,gnuplot 窗口打开,但里面没有任何内容。如果我替换$path为实际路径,则图表将正确绘制。
请问您能建议一种方法吗?谢谢。
我需要在不同的设备上运行 gnuplot 脚本。一旦我到达特定目录,设备上的文件结构是相同的,但这些目录的路径不同。我想我需要在路径名中有一个变量,我可以根据我所在的设备来更改它。
我认为以下内容会起作用,因为我在这里找到了类似的东西,但事实并非如此:
path_to_directory="/desktop/path/to/directory"
# path_to_directory="laptop/path/to/directory"
# the line above is commented out but it can be included
# if I want to switch from my desktop to my laptop
path_to_file="$path_to_directory/path/to/file"
plot path_to_file ...
Run Code Online (Sandbox Code Playgroud)
警告消息显示:正在跳过不可读的文件“$path_to_directory/path/to/file”
您知道如何在 gnuplot 脚本的路径中包含变量,以便可以在路径之间轻松切换吗?
谢谢。