MATLAB Figure and LATEX
조회 수: 19 (최근 30일)
이전 댓글 표시
Hi,
I produced some figures using MATLAB but when I add them into (Latex documnet) , it looks very small. I tried to increase font for text and legend but the problem still the there.
I attached one example figure. Thanks in advance!
댓글 수: 4
Star Strider
2021년 3월 7일
I have no recent experience with preparing LaTeX documents, so unfortunately, no.
I’m hoping that someone with relevant experience will see this and can help you solve this. Perhaps posting an image of the document, or uploading the document itself (probably as a .zip file if the native file format isn’t supported on MATLAB Answers) would be helpful.
답변 (1개)
Jorg Woehl
2021년 3월 7일
I'm not sure what the issue is, but your figure displays just fine when I save it to a png file (my preferred graphics file format) and then insert it into a LaTeX document. Here is a minimal working example:
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\centering
\includegraphics[scale=0.25]{test.png}
\caption{your caption text}
\end{figure}
\end{document}
I usually scale figures down by 50%, but that wasn't quite enough in this case.
The output on a letter-size page is shown below (produced using Overleaf, by the way):
댓글 수: 2
Jorg Woehl
2021년 3월 7일
What do you mean exactly by "not showing everything"? As far as I can tell, everything is there from your original figure: axis labels, ticks and tick marks, grid, legend, data points and plots...
If you want to insert a picture of the entire figure window (with menu bar etc.), you would need to take a screenshot and insert that into your LaTeX document.
I am not sure if LaTeX can handle subfigures; my suggestion would be to first make a composite figure either in MATLAB itself (use subplot or tiledlayout) or an external drawing app, and insert this into your LaTeX document.
참고 항목
카테고리
Help Center 및 File Exchange에서 Graphics Object Properties에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!