Hi everybody:
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
Graphics, Figures & Tables ⇒ problems with matlab *.eps files
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
problems with matlab *.eps files
Please read entirely and carefully our topic with very important information [1]. It will show you some critical points. It's in your own interest that you pay attention to the given hints.
Reading your description one sentence catches my eye.
[1] View topic: Avoidable mistakes
Best regards and welcome to the board
Thorsten
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
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
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
Thanks very much Thorsten for your answer. I'll try to be more careful in posting questions.
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
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
Dear all:
I already have solved the problem. It was just installing Ghostscript.
Thanks,
Carles
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
I wonder if there's no function in Matlab to export your charts and diagrams directly as PDF. If not, search the forum for »epstopdf« to get solution for converting your EPS file to PDF and their inclusion when compiling with pdflatex. This would also need Ghostscript installed.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10