Importing MATLAB Figures into Latex
Mostrar comentarios más antiguos
I have a Matlab figure and I want to import it to latex. My code is
>> plot3(Pa,Pb,Profit,'x') >> print -deps graph1
Then I copy and paste the eps file to my latex file and use this code.
\begin{figure}
\centering
\includegraphics{graph1}
\caption{}
\end{figure}
Error: Unknown graphics extension.
Does anyone know how to import Matlab figures into Latex?
Thanks
2 comentarios
marcflight
el 21 de Sept. de 2015
Did you add \usepackage{graphicx} in the preamble ? Did you move the graph1 image to your LaTeX directory?
Sanket Bhagat
el 11 de Oct. de 2017
still same problem sir?? what to do?
Respuesta aceptada
Más respuestas (2)
Chad Greene
el 18 de En. de 2015
1 voto
Instead of print I tend to use export_fig to export a very nice looking pdf. \includgraphics handles pdfs well.
3 comentarios
Yellow Canary
el 19 de En. de 2015
Yellow Canary
el 19 de En. de 2015
Chad Greene
el 19 de En. de 2015
I am guessing you put export_fig somewhere that Matlab can't find it. And pdfs in LaTeX should be no problem with \usepackage{graphicx} in the header.
Youssef Khmou
el 19 de En. de 2015
Besides the explained proposition above, try to specify the extension in the source File :
\usepackage{graphicx}
\usepackage{epstopdf}
% other Tex instructions {Document ....}
\begin{figure}
\centering
\includegraphics{graph1.eps}
\caption{....}
\end{figure}
1 comentario
Muhammad Salman Bashir
el 5 de Dic. de 2019
but my graph shape is black i want it in colours these graph..is this possible with these graphs????
Categorías
Más información sobre Printing and Saving en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!