Graphics, Figures & TablesEPS File is not included

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
latexuser1310
Posts: 4
Joined: Thu Oct 13, 2011 6:30 pm

EPS File is not included

Post by latexuser1310 »

Hi,

I use MikTeX to create a PS file but I am not able to include the EPS file "fig-test.eps".

The resulting PS does not contain the figure. What can I do?

Example is attached.
Attachments
fig-test.zip
(20.51 KiB) Downloaded 147 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

EPS File is not included

Post by kaiserkarl13 »

The following sequence worked for me:

Code: Select all

latex fig-incl.tex
latex fig-incl.tex
dvips fig-incl.dvi
If you post the PostScript (.ps) file, we might be able to tell whether it's your PostScript file or your PostScript viewer that is the problem.
latexuser1310
Posts: 4
Joined: Thu Oct 13, 2011 6:30 pm

Re: EPS File is not included

Post by latexuser1310 »

OK, thank you for your answer.

The PS file is attached.

btw: I have Windows XP, SP3, MikTex 2.9, Ghostscript 9.02 and GSview 4.9.
Attachments
fig-incl.zip
(59.72 KiB) Downloaded 153 times
kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Re: EPS File is not included

Post by kaiserkarl13 »

There seems to be something wrong with the original EPS file. For example, the numbers don't seem to be of proper scale, and they overlap the axes. I dismissed this the first time because it seemed to work otherwise, but now I think the original EPS file is corrupt.

If you run eps2eps on it, you get a blank image. If you run epstopdf on it, you get a blank image. I also get error messages about the resulting PDF or EPS file, so it's definitely not converting properly.

Perhaps this is "garbage in, garbage out"?
latexuser1310
Posts: 4
Joined: Thu Oct 13, 2011 6:30 pm

Re: EPS File is not included

Post by latexuser1310 »

OK, thanks for your answer.

I created the EPS file in the following way:

- run gnuplot with epslatex terminal
- run the resulting latex file to get a PS
- convert this PS with GSview to EPS
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

EPS File is not included

Post by localghost »

latexuser1310 wrote:OK, thanks for your answer.

I created the EPS file in the following way:

- run gnuplot with epslatex terminal
- run the resulting latex file to get a PS
- convert this PS with GSview to EPS
Why don't you just use the »postscript« terminal of Gnuplot with its option(s) »eps enhanced«? A better way would be to use gnuplottex if you insist on doing your plots with Gnuplot. This package lets you control the Gnuplot scripts from inside your document.

If you are looking for consistency regarding the fonts in your diagrams, then a much smarter way would be to let packages like pgfplots (based on pgf/tikZ) or pst-plot (based on PSTricks) do the job.


Thorsten
latexuser1310
Posts: 4
Joined: Thu Oct 13, 2011 6:30 pm

Re: EPS File is not included

Post by latexuser1310 »

Thanks localghost for your answer.

I have finally found a solution:

Open the EPS file with gsview, click on "Edit -> Convert to vector format" (needs pstoedit), select PDF with the option "Draw text as polygons" and save the file as a PDF. Start Inkscape and import the PDF file. Save it as EPS again.
User avatar
shadgrind
Posts: 140
Joined: Thu Jul 16, 2009 12:39 am

EPS File is not included

Post by shadgrind »

latexuser1310 wrote:I created the EPS file in the following way:

- run gnuplot with epslatex terminal
- run the resulting latex file to get a PS
- convert this PS with GSview to EPS
That's not the way you're supposed to use files created for the epslatex terminal in gnuplot.

When you use the epslatex terminal, two files get created: a latex file and an eps file. For example, myfile.tex and myfile.eps. You then include that latex file in your document using \input:

Code: Select all

\input{myfile}
The myfile.tex file tells LaTeX to use the myfile.eps file created by gnuplot; you don't have to create that eps file because gnuplot already created it for you.
System: TeX Live 2012, Fedora 18 x86_64, GNU Emacs 24.2
Post Reply