x-axis value on gnuplot

后端 未结 1 1727
生来不讨喜
生来不讨喜 2021-01-06 08:44

I am playing around with gnuplot.My data set looks like this.

1     0.530000  0.510000
2     0.420000  0.310000
4     0.400000  0.160000
8     0.390000  0.07         


        
相关标签:
1条回答
  • 2021-01-06 09:03

    Instead of calling:

    plot "time_mem_access.dat" using 1:2 title "cache access 1", \
          ""                   using 1:3 title "cache access 2"
    

    You can try:

    plot "time_mem_access.dat" using 1:2:xtic(1) title "cache access 1", \
          ""                   using 1:3:xtic(1) title "cache access 2"
    

    Which will give you the following plot: enter image description here

    However you might want to take a log of the x values:

    plot "time_mem_access.dat" using (log($1)):2:xtic(1) title "cache access 1", \
          ""                   using (log($1)):3:xtic(1) title "cache access 2"
    

    Which would give you: enter image description here

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