I wanted to plot a graph with log base 2 using my data on latex. It plots a straight line while it should have ploted a curve .
\begin{gnuplot}[terminal = latex, terminaloptions = {size 2.8in,3.0in}]
set mxtics 2
set mytics 2
set key left top
set xrange[1.0:0]
set yrange[1.6:1.62]
set xlabel "User selected parameter $t_0$"
set ylabel "\\rotatebox{90}{Validation Error (\\%)}"
plot "data" u 1:(log(5)) with linespoint lc "black" title "abc"
Can anyone assist me with this? I am plotting this on Overleaf.
Best Answer
You probably meant to write
u 1:(log($5))
(note the$
).Here is my made-up
data.dat
.Live example on Overleaf