set terminal pdf set output "plot.pdf" set xlabel "x" set ylabel "y" set tics out set key out plot \ "data" with errorbars title "data" \ , sin(x) with lines title "theory" set terminal latex rotate set xlabel "$x$" set ylabel "$y$" set output "plot.tex" replot