Display powers of 2 on the axis with gnuplot

前端 未结 1 973
难免孤独
难免孤独 2021-01-18 02:41

I am trying to use gnuplot to plot results from my experiments.

I wrote a C++ program that generates a datafile that looks like this:

10   3.5
11            


        
1条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-18 02:59

    this is done relatively easy by manipulating the using specification:

    plot datafile using (2**$1):2
    

    If you do this, you'll probably also want a

    set logscale x 2
    set format x '2^{%L}'  #<- enhanced text.
    

    to make the plot look nicer.

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