I am plotting a couple of lines in a certain data set. A couple of the data points (column 13 in the example below) are special, I want them to be marked with a circle and labeled (the labels are in column 12).
plot "data.csv" using 0:13 with circles lt 3 fs transparent solid 0.3 noborder notitle,\
"data.csv" using 0:13:(sprintf("(%d, %d)", $1, $12)) with labels nopoint offset char 1,-2 notitle,\
"data.csv" using 0:6 with lines lt 7 lw 2
I already figured out how to do that. Unfortunately the labels do overlap sometimes, which makes them unreadable. How can I make the labels appear alternating above/below the data points? I tried to define a function that switches between -1/1, but failed to do so. I also tried to make the offset random by adding
"data.csv" using 0:13:(sprintf("(%d, %d)", $1, $12)) with labels nopoint offset char 1,int(-5*(rand(0))) notitle
but that also did not work (no visible effect).
Below is an example how the current version looks like (with a couple more plotted lines, I tried to keep the code sample short). Appreciate any help...