LaTeX forum ⇒ Graphics, Figures & TablesEPS 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

Postby BastienBastien » Sun Aug 06, 2017 9:33 pm

Good evening LaTeX2e users,

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

  1. \begin{figure}
  2. \centering
  3. \includegraphics[scale=0.40,angle=0]{pictures/myfigure111}
  4. \caption{Simulation blablabla}
  5. \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

User avatar
thomasb
Posts: 76
Joined: Thu Aug 03, 2017 10:54 am
Location: france

Postby thomasb » Mon Aug 07, 2017 1:18 am

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

Postby BastienBastien » Mon Aug 07, 2017 8:57 am

This would be a workaround, but I guess there is an elegant solution.

User avatar
Stefan Kottwitz
Site Admin
Posts: 8368
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Mon Aug 07, 2017 12:34 pm

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
Site admin

BastienBastien
Posts: 32
Joined: Mon Aug 20, 2012 2:27 pm

Postby BastienBastien » Tue Aug 08, 2017 9:44 am

Many thanks you two.

User avatar
thomasb
Posts: 76
Joined: Thu Aug 03, 2017 10:54 am
Location: france

Postby thomasb » Tue Aug 08, 2017 5:24 pm

So how did you do, how did you do ?!? :shock:


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: Bing [Bot] and 11 guests