I am trying to do a plot using epslatex
interface of gnuplot where I am using latex command for labelling the y-axis and then include the plot
in another TeX file. I am writing the following steps but somehow the .eps
file is not generated, only the .tex
file is generated. Please help.
reset
set terminal epslatex
set term postscript colour enhanced
set term postscript eps enhanced 26
set output "pb_sp_I=6.tex"
set style data lines
set size 1,1
set origin 0,0
set multiplot
set size 1,1
set origin 0,0
set log
set xlabel "t" font "Times-Roman,30"
set ylabel "$P_t(\\ell)$"
set format y "10^{%L}"
set format x "10^{%L}"
set xr [0.1:10000]
set yr [0.000001:1.2]
p 'sp_I=6.out' u 1:2 w l title 'I=6' lc 1 lw 2, 1800/x**1.5 lw 2 title 't^{-1.5}', 1.7/x**0.5 lw 2 title 't^{-0.5}'
I removed the line
set term postscript eps enhanced
and it is now producing 2 files, pb_sp_I=6.eps
and pb_sp_I=6.tex
. Then I converted EPS to PDF. I included the .tex
file above in another .tex
file, say a.tex
, by writing the following :
\begin{center}
\input{pb_sp_I=6.tex}
\end{center}
Then I compile a.tex using the command :
pdflatex a.tex
But the output contains the figure file only with the axes, tics, lines but the
y-axis labeling in latex ($P_t(\\ell)$
) is not there. Please advise if I am missing something.