Plot from two files with errorbars for Gnuplot

后端 未结 2 2081
不思量自难忘°
不思量自难忘° 2020-12-18 16:11

I am thinking which way to do the addition of errorbars better by thinking the format of data. The standard way of adding errors bars is discussed here, for instance.

2条回答
  •  一生所求
    2020-12-18 16:52

    Gnuplot 5 supports that you specify several characters as data file separators.

    So, if you are sure you'll never get negative values (which I hopen given the format of your data), then you can use your original data file and set both white space and hyphen as datafile separator:

    set datafile separator " -"
    plot for [i=2:6:2] "data" using 1:(0.5*(column(i)+column(i+1))):(0.5*(column(i+1)-column(i))) with yerrorlines
    

提交回复
热议问题