Include data points in gnuplot smooth

Data availability as:

38 52.26 41 46.34 42 49.49 

Using smooth strings; can i include points on the line of the graph without stringing it twice?

Now I use:

 plot "foo.dat" using ($0):2 smooth csplines title "foo", \ '' using ($0):2 with points title "" 

Sample graph

Extended Simplified Dataset:

 38 52.26 39 46.34 42 57.29 43 60.41 44 53.57 45 51.49 46 48.24 49 58.50 50 56.85 51 55.56 52 62.81 54 51.76 55 46.94 56 46.35 57 52.76 59 49.49 62 51.78 63 48.24 65 54.46 66 50.00 
+4
source share
1 answer

This is my way of doing this:

 ... plot "file" using 1:3 notitle with points linestyle 1, \ "" using 1:3 notitle smooth csplines with lines linestyle 1, \ 1 / 0 title "title" with linespoints linestyle 1 ... 

enter image description here

The first entry displays points on the chart without a legend. The second entry displays a smooth line on the chart, again without a legend. The third entry is for legend only, using combined strings.

If you use line lines on a smooth line, they will display all the points making them smooth, not just the data points.

'linestyle' tells gnuplot to build all the data using the same style, basically making up lines and points to create line points. The third line, "linespoints", is for legend only and does not put any data on the chart.

+6
source

All Articles