[Tex/LaTex] eps figure (image) quality loss on including it in latex


I saw Included PNG appears blurry in PDF and How do I insert an image in LaTeX so it looks good on print? also etc. However, I am trying to include .eps images, which are generated using gnuplot. Still, there is a loss of details.
Here is how I generate in gnuplot.

set term postscript eps color blacktext "Helvetica" 24
set output "filename.eps"

When I see .eps itself with evince, it looks fine, but after I use latex and make pdf using:

dvipdf PAPER.dvi  PAPER.pdf

the image does not look to be that clear. Here is the MWE:

\includegraphics [scale=0.5] {rough} 

rough.eps is here: http://www.tempfiles.net/download/201208/256505/rough.html. It was generated as png using powerpoint, then changed to eps using inkscape. Those generated using gnuplot are my results, hence I shared this instead.

Best Answer

The main problem here seems to be the understanding of the difference between raster or pixel graphics on the one hand and vector or line graphics on the other hand. The difference is explained in the questions already linked by the OP or in the Wikipedia article on vector graphics.

Typical file formats for raster graphics are .jpg, .png, .gif or .tiff (read more here).
Programs for creating & editing raster graphics are Microsoft Paint, Photoshop or Gimp and many more.

Typical file formats for vector graphics are .eps, .pdf or .svg (read more here).
Programs for creating & editing vector graphics are Inkscape, Corel Draw, Adobe Illustrator and many more.

Most vector file formats can also contain raster graphics, e.g. as background decoration. Including or converting a .png file into a .pdf file does not make it a vector graphic.
On the other hand, converting a vector graphic into a raster graphic makes it a raster graphic forever, there is no way back (apart from vectorisation, which is usually as laborious as creating a new graphic from scratch).

gnuplot and also Matlab, Octave, matplotlib etc are capable of exporting vector graphics:

  • Choose eps if your workflow is latex->dvi->ps->pdf.
  • Choose pdf if your workflow is pdflatex->pdf.
  • Choose .emf or .wmf iy you are using Microsoft Word.

The OP also asks about block diagrams created with MS PowerPoint. PowerPoint internaly uses vector graphics for block diagrams but does not allow export to vector graphics directly, not even to the vector formats developed by Microsoft (called .wmf and .emf). The workaround here is to export to pdf, either by "printing" to a pdf printer like Adobe Acrobat Distiller or pdfCreator, or by using the "save to pdf" function which is included in MS Office 2007 and newer. This approach also works for Excel diagrams.

As an alternative way to create plots and block diagrams, I would suggest to look at TikZ/PGF.