How to output a file in gnuplot multiplot mode?

☆樱花仙子☆ 提交于 2019-12-21 09:27:08

问题


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

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.


回答1:


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

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.



来源:https://stackoverflow.com/questions/25388994/how-to-output-a-file-in-gnuplot-multiplot-mode

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!