LaTeX forum ⇒ Graphics, Figures & Tables ⇒ EPS imported to LaTeX, title not centered Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
BastienBastien
Posts: 32
Joined: Mon Aug 20, 2012 2:27 pm

EPS imported to LaTeX, title not centered

Good evening LaTeX2e users,

I export some plots from Matlab via the command:
print -depsc2 myfigure111
Then I import them in LaTeX via:

\begin{figure}	\centering	\includegraphics[scale=0.40,angle=0]{pictures/myfigure111}	\caption{Simulation blablabla}\end{figure}

Everything is okay, but the title is is not centered (top of the figure, but on the left side).
In Matlab the plot title is perfektly centered! (top of the figure, and on the middle of the figure).

Have you got an idea?

Regards,
Me

thomasb
Posts: 76
Joined: Thu Aug 03, 2017 10:54 am
Location: france
Well, I would answer to remove the title and make your own... Does this suit you ?

BastienBastien
Posts: 32
Joined: Mon Aug 20, 2012 2:27 pm
This would be a workaround, but I guess there is an elegant solution.

Stefan Kottwitz
Posts: 8368
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:
That's clearly a Matlab export issue. LaTeX doesn't change the content of an image when it's included. Though Matlab displays it centered, it generates an export EPS file where it's not centered any more.

As Thomas suggested, you can remove the title and add it via LaTeX, or fix the image using an image editor.

Stefan

BastienBastien
Posts: 32
Joined: Mon Aug 20, 2012 2:27 pm
Many thanks you two.

thomasb
Posts: 76
Joined: Thu Aug 03, 2017 10:54 am
Location: france
So how did you do, how did you do ?!?