【问题标题】:ploting many files order on one line at gnuplot在 gnuplot 的一行上绘制许多文件顺序
【发布时间】:2013-08-16 22:59:15
【问题描述】:

我必须绘制 10 个具有相同图例的文件,但我还需要对文件中的数字进行排序,因为当我在 gnuplot 上写一行时,它会显示一些不好的图像。有些数字必须在其他数字之前才能在我的图表上显示一条连续线。看着红线可以明白我的意思。有什么办法吗?

plot '<paste ../00/Statistic100.txt ../01/Statistic100.txt ../02/Statistic100.txt ../03/Statistic100.txt ../04/Statistic100.txt ../05/Statistic100.txt ../06/Statistic100.txt ../07/Statistic100.txt ../08/Statistic100.txt ../09/Statistic100.txt' with linespoint ls 1 title 'Reputation until 100%'

提前致谢! 费利佩

【问题讨论】:

    标签: plot gnuplot


    【解决方案1】:

    在 plot 命令后使用smooth unique

    来自gnuplot documentation

    unique 选项使 x 中的数据单调;相同的点 x 值被具有平均 y 值的单个点替换。这 结果点然后由直线段连接。

    示例

    无需订购

    plot "-" with lines
     0   3
     2   4
    -2   2
    -5  -1
     1   5
     5   6
    -1  -3
     4   0
    -3  -3
     3  -4
    -4   1
    e
    

    结果:

    有订单

    plot "-" smooth unique with lines
     0   3
     2   4
    -2   2
    -5  -1
     1   5
     5   6
    -1  -3
     4   0
    -3  -3
     3  -4
    -4   1
    e
    

    结果:

    【讨论】:

    • +1 生活和学习。这比摆弄“借来的”Linux 命令要好得多!
    • @user154555 请将答案标记为最佳答案,如果您认为值得,请将该问题从未回答队列中删除。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-14
    • 2013-04-10
    • 1970-01-01
    • 1970-01-01
    • 2012-03-21
    相关资源
    最近更新 更多