Tuesday, May 21, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 13126  / 3 Years ago, sun, october 10, 2021, 6:02:55

I want to write gnuplot command for a file which just I have one column of that. In the file and that column is Y, But in the file I don't have X's column.X's column element are



1
2
3
4
5
6
7


.Pay attention to the belowe think they are my in file witch they
"



12
43
65
76
12
56


"
As you see I have Y's element but I do not have X's element in my file,I mean X elemat is based on the row number.I guess there should be an command in gnuplot which does this.


More From » gnuplot

 Answers
3

This is the default behaviour for single column files. The difference is that the standard numbering is to number x=0,1,2,...



Here's my data (in file temp.dat)




12
43
65
76
12
56


Plot with




gnuplot> plot "temp.dat" with linespoints title "Single column data"


or similar.



To shift the x-axis so that x=1,2,3...




gnuplot> plot "temp.dat" using ($0+1):1 with linespoints title "Single column data"

[#29630] Sunday, October 10, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
velelf

Total Points: 395
Total Questions: 115
Total Answers: 107

Location: Sudan
Member since Mon, Jun 1, 2020
4 Years ago
;