How to treat the first line of the data file as column labels in gnuplot?

后端 未结 5 956
一个人的身影
一个人的身影 2021-02-07 03:08

I have a table like this:

A B C D E F G H I 
10 23998 16755 27656 17659 19708 20328 19377 18925
20 37298 33368 53936 41421 44548 40756 40985 37294
相关标签:
5条回答
  • 2021-02-07 03:21

    You could also use a gnuplot toolkit such as this one for Python if you want have a lot of data to plot and you want to automate the extraction of the titles.

    0 讨论(0)
  • 2021-02-07 03:26
    set key autotitle columnhead
    
    0 讨论(0)
  • 2021-02-07 03:33

    plot for [n=2:12] 'vv.csv' u 1:(column(n)) w lines title columnhead(n)

    I didn't want to plot the first column of data hence n=2:.....

    0 讨论(0)
  • 2021-02-07 03:38

    I checked the documentation and I don't see a way to do it automatically, but you can manually set a title with

    plot "file.txt" using 1:2 title "A" with lines smooth bezier ...
    
    0 讨论(0)
  • 2021-02-07 03:38

    I once wrote a script to plot FM radio station frequencies along an axis from 87MHz to 108MHz, using the names of each radio station as vertical labels. This was not a pure gnuplot solution, the input file is processed with perl with make, but I suggest you have a look at it and see if you can use something like that.

    0 讨论(0)
提交回复
热议问题