I would try another approach with special LaTeX packages for generating plots. Then you wouldn't have to worry about font consistency in your LaTeX document. Furthermore you could evade the problems you described.
At first there would be
pgfplots (based on
pgf/tikZ).
Code: Select all
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[%
xlabel={x},
ylabel={$\left(\frac{\sin(x)}{x}\right)^2$},
xmin=-10,xmax=10,ymin=0,ymax=1,
xtick={-10,-5,...,10},
ytick={0,0.2,...,1}
]
\addplot[domain=-10:10,samples=100] gnuplot {(sin(x)/x)**2};
\end{axis}
\end{tikzpicture}
\end{document}
The package uses
Gnuplot as back-end. This version can be compiled directly with PDFLaTeX.
Another one would be
pst-plot (based on
PSTricks).
Code: Select all
\documentclass{article}
\usepackage{pst-plot,pstricks-add}
\begin{document}
\psset{%
llx=-1.5cm,lly=-1cm,
xAxisLabel={$x$},
xAxisLabelPos={0,-0.1},
yAxisLabel={$\left(\frac{\sin(x)}{x}\right)^2$},
yAxisLabelPos={-2.5,0.5}
}
% \psframebox[linestyle=dashed,linewidth=0.4pt]{%
\begin{psgraph}[axesstyle=none,ticks=none](-10,0)(10,1){10cm}{7cm}
\psplot[algebraic,plotpoints=100]{-10}{10}{(sin(x)/x)^2}
\psaxes[axesstyle=frame,ticksize=5pt,tickstyle=inner,Dx=5,Dy=0.2,Ox=-10](-10,0)(10,1)
\end{psgraph}
% }
\end{document}
This version needs to be compiled with LaTeX to DVI and then converted via PS to PDF (XeLaTeX or PDFLaTeX with the additional
auto-pst-pdf package didn't work for me).
Further adjustments are left to the interested reader. Study the manuals of the involved packages and follow their instructions. The code for the actual plots can easily be embedded into a float environment. In case of upcoming questions, feel free to ask. If you insist doing your plots with
Gnuplot, have a look at the
gnuplottex package.
Best regards and welcome to the board
Thorsten