【问题标题】:Contour plot in XmgraceXmgrace 中的等高线图
【发布时间】:2016-02-14 21:12:28
【问题描述】:

我有一个包含 3 列的数据文件。现在我想用 xmgrace 绘制等高线图,因为我主要使用 xmgrace。但不知何故,我现在无法绘制它。谁能帮我一点忙?提前致谢。 数据格式如下:

3.24 4.78 0.015776 3.24 4.80 0.011777 3.24 4.82 0.00986 3.24 4.84 0.010185 3.24 4.86 0.012515 3.26 4.78 0.009244 3.26 4.80 0.006368 3.26 4.82 0.005792 3.26 4.84 0.007121 3.26 4.86 0.010361 3.28 4.78 0.004666 3.28 4.80 0.0028 3.28 4.82 0.003017 3.28 4.84 0.005285 3.28 4.86 0.0095 3.30 4.78 0.001295 3.30 4.80 0.000557 3.30 4.82 0.001924 3.30 4.84 0.005266 3.30 4.86 0.010401 3.32 4.78 0 3.32 4.80 0.000233 3.32 4.82 0.002508 3.32 4.84 0.006666 3.32 4.86 0.012515 3.34 4.70 0.012943 3.34 4.72 0.006904 3.34 4.74 0.002791 3.34 4.76 0.000662 3.36 4.70 0.011024 3.36 4.72 0.005998 3.36 4.74 0.003063 3.36 4.76 0.001814 3.38 4.70 0.011203 3.38 4.72 0.007077 3.38 4.74 0.004755 3.38 4.76 0.004188 3.40 4.70 0.01263 3.40 4.72 0.009182 3.40 4.74 0.007685 3.40 4.76 0.007985

最终的曲线应该如附件所示。

【问题讨论】:

    标签: contour xmgrace


    【解决方案1】:

    快速的 Google 搜索显示 xmgrace(又名 Grace)does not support contour plots

    有大量使用gnuplotmatplotlibOrigin 等的等高线图示例脚本。

    这是一个使用您的数据的 gnuplot 的简单示例: 将数据保存为 3 列数据文件 data.dat 后,将以下内容保存为脚本文件:

    set parametric
    set contour base
    set view 0,0,1
    unset surface
    unset key
    unset ztics
    set dgrid3d
    set title "Simple contour plot example" 
    set xlabel "X" 
    set ylabel "Y" 
    set cntrparam levels 10
    splot "data.dat" using 1:2:3 with line
    

    并从 UNIX 命令行调用 gnuplot -persist scriptfile。 这给出了以下输出:

    所以,看起来您没有使用 xmgrace,您使用的是 gnuplot,这就是为什么您无法再次解决如何在 xmgrace 中重新制作原始情节的原因!

    【讨论】:

    • 非常感谢,你说得对,我没有尝试使用 xmgrace。再次感谢!
    【解决方案2】:

    您可以使用 GraceGtk 绘制等高线,GraceGtk 是 Grace 的一个分支,还添加了 Undo 功能。

    目前,此软件可通过https://sourceforge.net/projects/gracegtk/ 获得。

    只要 GraceGtk 可以在 Internet 的某个地方下载,此答案就有效。

    等高线图和撤消是 Grace 未来版本的计划功能。

    【讨论】:

    • 欢迎堆栈溢出!请引用链接中最重要的部分,以防页面更改或永久离线。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-08-19
    • 2017-04-10
    • 2017-02-15
    • 1970-01-01
    相关资源
    最近更新 更多