You need to export the file from Visio using a method that avoids bitmapping. I think the MetafileToEPSConverter is what you need. Note that vector graphics can be stored using either eps or pdf without distortion; the blurring effect that you are seeing probably results from the file being stored using a bitmap format (jpg, gif, png, etc.) at some stage of your workflow.
To get LaTeX in labels or legends in Gnuplot, you need to use one of the terminals that produce LaTeX code.
For example, you could use the latex
terminal:
set terminal latex
set out 'plot.tex'
plot [-5:5] [-1.5:1.5] sin(x+pi) title "$\\sin(x+\\pi)$"
set out
That will produce a plot.tex
file that includes the plot using basic TeX statements. You can include that file in your main document using \input{plot.tex}
:
\documentclass{article}
\begin{document}
\input{plot.tex}
\end{document}
Which will give you
(notice that the quality isn't overwhelming when using the latex
terminal).
You can also use the epslatex
terminal:
set terminal epslatex color
set out 'plot.tex'
plot [-5:5] [-1.5:1.5] sin(x+pi) title "$\\sin(x+\\pi)$"
set out
This will include a plot.tex
file with all the labels, and a separate plot.eps
file including the graphical elements. You can include the output using
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\input{plot.tex}
\end{document}
Alternatively, you could create the plots directly within LaTeX, using a package like PGFPlots or pst-plot:
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
enlarge x limits=false,
legend entries=$\sin{x+\pi}$
]
\addplot [domain=-1.5*pi:1.5*pi, smooth] {sin(deg(x+pi))};
\end{axis}
\end{tikzpicture}
\end{document}
Best Answer
Please do always give full but minimal scripts and documents. The snippets you give aren't compileable. It are quite often those parts which aren't posted which make the problems.
Here a short example, which works fine:
A gnuplot script
filename.gp
:And a document
main.tex
with the contentNow run
to get a document with a correctly sized image.