Graphics, Figures & Tables ⇒ problems with matlab *.eps files
-
- Posts: 3
- Joined: Tue Mar 02, 2010 12:19 pm
problems with matlab *.eps files
I have problems in viewing figures created in Matlab (exported to *.eps format) in PDF documents. I'm working with WinEdt. Everything is fine after compiling to obtain *.dvi file. Problems arise when converting *.dvi file to *.pdf file: their left side appear cut (between 1-2 cm). Does any of you know what could be the reason for this?
Here is an example:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[12pt,a4paper,oneside,openright,openbib,spanish]{report}
\usepackage[dvips]{graphicx}
\begin{document}
\begin{figure}[!h]
\includegraphics[width=15cm]
{C:/red/blue/green/tesi_doctoral/latex/figures/cap8/1D_delta_prog.eps}
\centering\caption{}
\label{fig:1D_delta_prog.eps}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Thank you very much,
Carles
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
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
problems with matlab *.eps files
Reading your description one sentence catches my eye.
Be more precise in describing your conversion process. It's said to cause problems in some cases when converting from DVI directly to PDF. The route via PS seems to be more reliable.carleslatex wrote:[...] Problems arise when converting *.dvi file to *.pdf file: their left side appear cut (between 1-2 cm). [...]
[1] View topic: Avoidable mistakes
Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 3
- Joined: Tue Mar 02, 2010 12:19 pm
Re: problems with matlab *.eps files
As I said before, I'm using WindEdt. When I'm compiling the *.tex file to get a *.dvi file I obtain precisely what I was looking for. However, when I want to obtain a *.pdf version (by dvi2pdf) some figures made Matlab (7.X) and exported to *.eps appear cut: a vertical stripe of 1-1.5 cm width covering the overall height of the figure of its left side is not shown in the pdf file.
I tried, as you told me, to convert first to ps and then to pdf but I should have a problem with WindEdt configuration that I'm not able to understand. It is something related to Ghostscript that is not installed in my computer and, as I see, does not depend on my Tex system, right?. Here is the message I get:
****************************************************
GS-Bin: (gswin32c.exe): not Found
****************************************************
Ghostscript is used mainly to handle graphics (ps and eps files) and to convert ps files to pdf. Without it your TeX system may have a limited ability to display graphics but the basic functionality is not affected by its absence. It is recommended that you install Ghostscript and GSView to enhance the capabilities of your TeX system. A link is available on TUG's (www.tug.org) site. If GS is installed make sure that its BIN directory is on your PATH. WinEdt did not find any trace of installed GS in Windows Registry. If necessary, enter the GS Binary Folder manually in the Ghostscript Tab Page of the Execution Modes interface. Depending on your version of GS disable the Auto Detection and enter something like:
C:\Program Files\gs\gs8.54\bin
****************************************************
Thank you again.
Regards,
Carles
-
- Posts: 3
- Joined: Tue Mar 02, 2010 12:19 pm
Re: problems with matlab *.eps files
I already have solved the problem. It was just installing Ghostscript.
Thanks,
Carles
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
problems with matlab *.eps files
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10