duckworthd
duckworthd

Reputation: 15217

Blurred colors using epsfig or graphicx in LaTeX

My code is simple enough, and importing eps images is something I've done before with other matlab-generated content, but for one reason or another I end up with blurred colors in my heatmap when I use epsfig or graphicx to import it into my document. In the picture below, the right is what shows up if I compile to DVI and open up the document in Yap, and the left is if I simply view the eps in GSView.

alt text http://img85.imageshack.us/img85/1694/epsproblem.png

Here is my code. This example is using graphicx, but the idea is the same with epsfig.

\begin{figure}

\centering

\includegraphics[scale=0.5]{images/ngram3_model_raw.eps}

\caption{The perplexity when compared against the HUB test set}

\end{figure}

Is there perhaps some option I am forgetting?

Upvotes: 2

Views: 2342

Answers (2)

ypnos
ypnos

Reputation: 52397

What you see is bilinear interpolation. It is done by the viewer. Probably Matlab defines the plot contents as a pixmap (I guess you use imagesc?).

The solution is not straightforward. It may help to use a different processing chain (as WtFudgE pointed out) that will lead the data end up in a format where it is not interpolated anymore. You may also use a different viewer that does not interpolate and I would assume that a printer would also not interpolate. This can again be dependent of the application you print from.

Sorry that I don't have a solution for you; at least you now have some new words to search for in Google. ;)

Upvotes: 0

WtFudgE
WtFudgE

Reputation: 5228

I had the same problem with DVI, but if I compiled to pdf the pictures were fine

Upvotes: 0

Related Questions