Inserting MATLAB Figure in Latex: Solutions

  • Context: MATLAB 
  • Thread starter Thread starter sara_87
  • Start date Start date
  • Tags Tags
    Figure Latex Matlab
Click For Summary

Discussion Overview

The discussion revolves around the process of inserting MATLAB figures into LaTeX documents, focusing on issues related to figure sizing and formatting. It includes practical solutions and clarifications regarding the use of specific LaTeX commands and packages.

Discussion Character

  • Homework-related, Technical explanation

Main Points Raised

  • One participant describes their attempt to insert a MATLAB figure saved as an .eps file and notes that the figure is too wide for the page.
  • Another participant suggests using the command \includegraphics[scale=0.5]{picture.eps} to scale the figure down by half.
  • A different participant points out the necessity of including \usepackage{graphicx} in the LaTeX preamble for the graphics package to function properly.
  • One participant inquires about further scaling options, asking if using scale=0.75 or scale=0.25 would make the figure smaller.
  • A participant confirms they resolved their issue after receiving assistance.
  • Another participant explains the scaling commands, clarifying that scale=1 maintains the original size, scale=0.5 reduces it by 50%, and scale=0.25 reduces it to 25% of the original size.

Areas of Agreement / Disagreement

Participants generally agree on the methods for scaling figures in LaTeX, but there is no consensus on the optimal scaling factor for specific needs.

Contextual Notes

Limitations include potential misunderstandings about the effects of different scaling factors and the need for proper package inclusion in the LaTeX document.

sara_87
Messages
748
Reaction score
0

Homework Statement



I am trying to attach a MATLAB figure in Latex

Homework Equations





The Attempt at a Solution



I saved the graph as .eps instead of .fig, then i opened ghostscript, and saw that the figure was too wide to fit on the page...
how can i mend this?

thank you
 
Physics news on Phys.org
There is the command \includegraphics[scale=0.5]{picture.eps}
Where is this case you have scaled the picture down by half.
 
You also need \usepackacage{graphicx} in the preamble
 
awesome :)

what if i need it even a bit smaller?
would i put scale=0.75?
or scale=0.25?

thanks
 
i fixed it...
thank you
 
scale=1 means the same shape, scale=0.5 os 50% reduced. scale=0.25 is 25% of the original scale etc...
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 4 ·
Replies
4
Views
21K
Replies
11
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 7 ·
Replies
7
Views
8K