0

I imported an .svg image inside my document using the svg package. Since the image is too big, I used \resizebox{}{}{} to scale down both the image and its inside text at once. But I want the image's text to match the document's. So I used \fontsize{}{} to adjust it to match the size. But the problem is, the image's text gets too crammed and unreadable. How can I fix this?

My code:

\begin{figure}[h]
\fontsize{20}{20}\selectfont
\resizebox{6in}{!}{\includesvg{images/ECG-EEG Coherence}}
\end{figure}

Original .svg image: After compiling it looks like this:

How can I modify my code to get the image look as I wanted?

  • you would neeed to edit the svg to reposition the text, there is no general fix, basically you need to recreate a better diagram. – David Carlisle Oct 24 '22 at 13:11
  • Yeah, but it's kinda sad that LaTeX being known for its versatility, can't be able to achieve this. – AehkGuu Oct 24 '22 at 13:18
  • How could anyone, in any system, fix a bad image and generate a better image with no information about the source? The problem here is not latex, it is simply your question has no information that would allow anyone to answer. – David Carlisle Oct 24 '22 at 13:21
  • all you need to do is move your axis labels further out which is probably a simple edit to the svg but editing unseen code is hard – David Carlisle Oct 24 '22 at 13:24
  • The image was produced in MATLAB, so we have no control over adjusting the spacing between the axes labels. – AehkGuu Oct 24 '22 at 13:26
  • as I say you could edit the svg, or in matlab you could control the plot size so you did not have to shrink it and make the text small. – David Carlisle Oct 24 '22 at 13:30
  • Maybe one of the solutions in https://tex.stackexchange.com/questions/390804/how-to-scale-text-in-svg would work. Particularly something like \includesvg[pretex=\tiny]{svgfilename} seems promising. In any case \fontsize{20}{20} as you have now seems much too big. – Marijn Oct 24 '22 at 13:50

0 Answers0