MATLAB Inserting MATLAB Figure in Latex: Solutions

AI Thread Summary
To attach a MATLAB figure in LaTeX, saving the figure as an .eps file is essential. If the figure appears too wide for the page, the \includegraphics command can be used to scale it down. For instance, using \includegraphics[scale=0.5]{picture.eps} reduces the figure to 50% of its original size. To adjust the size further, scales such as 0.75 or 0.25 can be applied, where scale=1 retains the original size, scale=0.5 reduces it by half, and scale=0.25 reduces it to a quarter of the original size. Additionally, the graphicx package must be included in the LaTeX preamble for the \includegraphics command to function properly.
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
Views
1K
Replies
5
Views
3K
Replies
3
Views
3K
Replies
2
Views
2K
Replies
1
Views
2K
Replies
4
Views
21K
Replies
4
Views
3K
Replies
4
Views
2K
Back
Top