Back to Blog
Gnuplot using command5/7/2023 ![]() ![]() plot "sandbox_gp_pure.data" every ::1::5 us 3:4 t "set 1" w linesp \ ![]() If you cannot pre-order them with a sort, you can add smooth unique to plot the dataset with the linespoints style that loves entries ordered by the x coordinate. Note: You can use the every keyword without need to create subshells () and call external programs such as sed. You will obtain a 2 pages document, and a huger pdf file. Set output set terminal qt # or whatever is your default terminal Moreover in terminal as pdfcairo with set terminal pdfcairo set output 'my.pdf' It is a good habit because using again your script tomorrow, you can have a general slow down of your work process when the files are many, huge or on a remote filesystem when you perform long operations to process the data when the points effectively plotted are many and you need to wait the graphical update of the window even more if you are working through an ssh -X connection. With the replot command instead you plot again each curve already present on the graphic (rereading the data and performing again all the following operations) and only after you plot the new curve. Set style data linespoint # To avoid to repeat it on each line of plot command You may find interesting to put \ as last character to split a single line (note that it requires that there are not blank spaces or other characters after). Take it as a good habit but it is more, it is different in principle (see below). Since in your script I see no apparent reasons to need the use the replot command, I suggest to use directly the comma, to separate the two curve to be plotted: plot sin(x), cos(x) for example. Set grid xtics ytics mxtics mytics lc rgb 'blue' lt 1, lc rgb 'red' lt 1 set mxtics set mytics 5 ĭo not use the replot command, use the comma instead , ![]() Set xlabel "Size" set ylabel "log(Blocks)" Replot "<(sed -n '7,11p' sandbox_gp_pure.data)" using 3:4 with linespoints Plot "<(sed -n '2,6p' sandbox_gp_pure.data)" using 3:4 with linespoints I put here logscale on y-axis for clarity where some code is based on this answer set terminal qt Plot "<(sed -n '7,11p' sandboxgp.data)" using 3:4 with lines Plot "<(sed -n '2,6p' sandboxgp.data)" using 3:4 with lines My start based on this blogpost set terminal qt ![]()
0 Comments
Read More
Leave a Reply. |