【发布时间】:2014-03-17 19:31:35
【问题描述】:
我正在我的 ubuntu 分区上运行一个模拟 - 一个流体动力学问题,在我运行它的同时,我希望能够看到它是如何进行的,所以我有脚本来使用 gnuplot 绘制数据。这些看起来像这样 -
set term x11 1 noraise
set logscale y
set title "Residuals"
set ylabel 'Residual'
set xlabel 'Iteration'
plot "< cat log.simpleFoam | grep 'Solving for Ux' | cut -d' ' -f9 | tr -d ','" title 'Ux' with lines,\
"< cat log.simpleFoam | grep 'Solving for Uy' | cut -d' ' -f9 | tr -d ','" title 'Uy' with lines,\
"< cat log.simpleFoam | grep 'Solving for epsilon' | cut -d' ' -f9 | tr -d ','" title 'epsilon' with lines,\
"< cat log.simpleFoam | grep 'Solving for k' | cut -d' ' -f9 | tr -d ','" title 'k' with lines,\
"< cat log.simpleFoam | grep 'Solving for p' | cut -d' ' -f9 | tr -d ','" title 'p' with lines
pause 1
reread
第一行是我发现每次重新绘制图表时都会停止 x11 绘图窗口强制自身到前面的修复,但是我仍然有一个让我的生活变得困难的问题:每次重新读取绘图时任何文本我在任何应用程序中选择的选项都会自动取消选择,这使得运行这些程序变得非常困难,因为我想在它们运行时处理其他事情。
有谁知道发生这种情况的原因吗?或者有什么解决办法?
【问题讨论】:
-
无法通过这些信息重现您的问题。短脚本
set terminal x11 1 noraise; i = 1; plot i*x; while (1) { i = i+1; replot; pause 1;}也会发生同样的情况吗?有了这个脚本,我在使用 gnuplot 4.6.4 的 Debian 上没有任何问题。也许这也取决于您的窗口管理器设置? -
是的,这个脚本也是如此,我相信我正在运行 gnuplot 4.6.1,也许这是最近的错误修复。我会尝试@andyras 发布的解决方案
-
您能否发布有关您正在使用哪个版本的 Ubuntu、哪个窗口管理器/桌面环境的信息?