Gnuplot中带有wxt终端的两个交互式窗口 [英] Two interactive windows in Gnuplot with wxt terminal

查看:297
本文介绍了Gnuplot中带有wxt终端的两个交互式窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我经常使用Gnuplot的wxt终端进行一些快速的数据检查.我喜欢这种互动性,因此我可以轻松获得控制权以及缩放/移动等功能.

I often use the wxt terminal of Gnuplot to do some quick data inspection. I like the interactivity, such that I can easily gain control and zoom/move et cetera.

假设我必须遵循脚本

set terminal wxt 0 persist
plot x

set terminal wxt 1 persist
plot x**2

现在,在窗口1上,我具有交互式控件.但是,在窗口0上,此交互式控件丢失了.

Now, on window 1 I have the interactive control. However, on window 0 this interactive control is lost.

我的问题是:如何在窗口0上获得交互式控件?

My question is: How can I obtain interactive control on window 0?

我正在使用gnuplot 4.6.2.我已经看到 gnuplot多个图不是交互式的,但是关于x11终端,答案包括打开gnuplot的多个实例,这对我来说似乎不必要.

I am using gnuplot 4.6.2. I've seen gnuplot multiple graphs are not interactive but the question in about x11 terminal, and the answers consist of opening multiple instance of gnuplot, which seems unnecessary to me.

推荐答案

我相信已经找到了解决此问题的方法. 但不确定是否适用于所有情况.

I believe have found a workaround for this problem. But not sure if this works for all cases.

我的解决方案听起来很明显. 我创建了三个文件:configs.pltwxt1.pltwxt2.plt.

My solution sounds like obvious. I created three files: configs.plt, wxt1.plt, and wxt2.plt.

configs.plt文件包含:

set style line 1 lc "#e41a1c"
set style line 2 lc "#377eb8"

wxt1.plt文件包含:

set terminal wxt title "plot sin"
load "configs.plt"
plot sin(x) w l ls 1

wxt2.plt文件包含:

set terminal wxt title "plot cos"
load "configs.plt"
plot cos(x) w l ls 2

唯一无聊的事情是运行两个文件而不是一个文件.

The only boring thing is run two instead one file.

这篇关于Gnuplot中带有wxt终端的两个交互式窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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