如何在gnuplot多图模式下输出文件? [英] How to output a file in gnuplot multiplot mode?

查看:409
本文介绍了如何在gnuplot多图模式下输出文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在以gnuplot(版本4.6补丁程序级别5修补程序级别5)多图模式绘制图形,这些图形正在使用重读进行更新.

I am plotting graphs in gnuplot (version 4.6 patchlevel 5) multiplot mode, which are being updated using reread.

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

以前,我使用以下命令输出png文件:

Previously, I have outputted png files using:

set terminal pngcairo dashed enhanced
plot path/to/file using 1:2
set output 'foo.png'

但是我还没找到如何输出最新的多图屏幕的文件.请您告诉我我该怎么做?谢谢.

But I haven't been able to find how to output a file of the latest multiplot screen. Please would you tell me how I could do this? Thank you.

推荐答案

如gnuplot会告诉您:

As gnuplot will tell you:

您不能在多图模式下更改输出

you can't change the output in multiplot mode

因此请确保您事先进行设置:

So make sure you set it beforehand:

set terminal pngcairo dashed enhanced
set output 'foo.png'
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
}
unset multiplot
unset output
pause 10
reread

当前这是一个无限循环,因此我假设您正在手动中断它. unset行将导致输出被刷新,因此将写入最终图像.

This is currently an infinite loop, so I assume that you are interrupting it manually. The unset lines will cause the output to be flushed, so your final image will be written.

这篇关于如何在gnuplot多图模式下输出文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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