【问题标题】:Gnuplot: multiple plots in multiple windowsGnuplot:多个窗口中的多个绘图
【发布时间】:2020-12-20 15:31:19
【问题描述】:

我想做多个与同一文件的不同数据列相关的绘图,但我希望每个绘图都有一个新窗口。我不想要与命令set multiplot layout 1,2 关联的附加图。 这个想法由以下伪代码表示:

>gnuplot

>plot "myfile.txt" u 1:4

>#make me plot another file without deleting the previous one i.e. open a new window on which data is plotted

>instructions I don't know

>plot "myfile.txt" u: ($3*$3) 

>#I obtain two windows

【问题讨论】:

    标签: plot gnuplot gnu


    【解决方案1】:

    你不写你正在使用哪个终端。我了解您希望两个窗口彼此相邻,而不是两个图形作为磁盘上的文件。在 gnuplot 控制台中检查例如:help wxt。如果你想在磁盘上有两个文件,你必须选择另一个终端,例如

    set term pngcairo
    set output 'myOutput1.png'
    plot x
    set output 'myOutput2.png'
    plot x**2
    set output
    

    因此,使用交互式 wxt 终端,以下内容对我有用:

    代码:

    ### several terminals
    reset session
    
    set term wxt 1 size 500,400
    plot sin(x)
    
    set term wxt 2 size 500,300
    plot cos(x)
    
    set term wxt 3 size 300,200
    plot x**2
    
    ### end of code
    

    结果:

    【讨论】:

    • 我使用的是 Ubuntu,而不是 Windows 版本的 Gnuplot 或 Virtual box。
    • 然后,您可以使用例如。 set term qt 0、set term qt 1 等
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-06-17
    • 1970-01-01
    • 2017-01-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多