gnuplot - How to specify the start of the x-axis at 1 instead of 0 -
gnuplot - How to specify the start of the x-axis at 1 instead of 0 -
i utilize gnuplot plot execution times measured on cpu , gpu depending on info size. have 2 files execution times in it. plotting them straight forward.
set title "cpu vs gpu" set xlabel "number of particles (* 10'000)" set ylabel "time in microseconds" plot "cputimes.txt" title "cpu" linespoints, \ "gputimes.txt" title "gpu" wit the resulting plot can found here: 1
i tried utilize xtics doesn't shift x-axis start @ 1 starts ticks @ 1. how can shift x-axis starts @ 1 , ends @ 50?
update
datafile cputimes.txt below
64780 129664 195490 266697 327871 391777 459150 517999 582959 647984 717377 790415 830869 900475 959599 1026041 1092899 1156022 1297471 1286325 1349227 1415936 1482857 1539580 1607389 1673436 1737098 1801568 1874431 1935975 2006892 2053077 2129867 2195117 2254467 2314478 2373546 2435416 2506850 2587302 2625556 2674799 2758387 2820720 2896794 2953550 3053817 3089501 3170513 3271537
xtics "label" x-axis. looking sort of "data manipulation". i'd suggest making utilize of using so:
plot "cputimes.txt" u ($0+1):1 t "cpu" w lp, \ "gputimes.txt" u ($0+1):1 t "gpu" w lp to create plot end @ 50 there 2 ways:
you specify x-range set xrange [1:50] or
plot [1:50] "cputimes.txt" u ($0+1):1 t "cpu" w lp, \ "gputimes.txt" u ($0+1):1 t "gpu" w lp you need include every so:
plot "cputimes.txt" u ($0+1):1 every 1::::50 t "cpu" w lp, \ "gputimes.txt" u ($0+1):1 every 1::::50 t "gpu" w lp see every documentation farther reference.
gnuplot
Comments
Post a Comment