【问题标题】:How to plot/display ".dat" files using gnuplot in Python如何在 Python 中使用 gnuplot 绘制/显示“.dat”文件
【发布时间】:2012-03-11 11:51:58
【问题描述】:

我目前正在尝试使用 gnuplot 绘制我的数据。我在一个文件夹中有几个 .dat 文件,我希望使用一些简单的命令/脚本来绘制我的所有数据(见下文)。我怎样才能让它发挥作用?

我目前正在使用这件作品:

#!/usr/bin/gnuplot
set terminal postscript eps enhanced color
set output "DMF-10-8-.eps"
set xrange[1:10]
set yrange[0:1]
plot "DMF-10-8.dat" using 1:2 with lines title "XXX", "DMF-10-8-wmnuy9.dat" using 1:2 with     lines title "YYY"

【问题讨论】:

  • 这个方法有什么问题?

标签: python gnuplot


【解决方案1】:

如果要绘制大量文件,请按特定顺序命名它们。然后使用Python 中的gnuplot 模块循环连续绘制它们。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-10-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-09
    • 1970-01-01
    相关资源
    最近更新 更多