Size of exported SVG incorrect
이전 댓글 표시
Hi,
i have a problem exporting my figures as svg vector images. I tried the following commands to set my desired size:
set(gcf,'units','centimeters','position',[0,0,7.5,10], 'paperunits','centimeters', 'PaperSize', [7.5,10],'PaperPosition', [0,0,7.5,10]);
I want the SVG to have the width of 7.5 cm and 10 cm height. I know that scaling vectors is no problem, but i want to keep font size the same as the document size where it will be implemented, so scaling is no option.
If i open or implement the SVG image, its final size (i.e. in Inkscape) is exact 424x567 pixels or in cm 11.21833x15.00187 cm. The font size in the SVG is 15 instead of 12. The figure itself in Matlab is displayed correct, but why is the image scaled up. Also the scaling for size and font size is different.
Anybody any ideas what is wrong here?
Greetings
댓글 수: 4
Leonard Classen
2020년 4월 24일
I have the same problem! I cannot image we are the first people recognizing this issue.
Emma Simmerman
2020년 5월 1일
Same problem here! So frustrating.
Timmy Ngo
2020년 5월 23일
Same problem here!
Théo ASPERT
2021년 9월 3일
Same problem, so many hours lost
답변 (2개)
Simon Pfingstl
2021년 11월 12일
편집: Simon Pfingstl
2021년 11월 13일
4 개 추천
I think the problem comes from the display scaling.
Make sure that you set the display scaling to 100% before you start Matlab (for Windows 10: Settings -> System -> Display -> Scale and Layout -> 100%). After you have started Matlab, you can change the scaling again to your disired one.
댓글 수: 1
Alexander Lerch
2022년 1월 21일
Oh man. This was driving me crazy as I regularly switch between desks/monitors and I couldn't figure out why the figures were exported in different sizes. Thanks for the tip.
댓글 수: 2
Christian Plank
2020년 5월 23일
이동: Rik
2023년 5월 30일
Adam Danz
2023년 5월 31일
@Christian Plank I recommend contacting tech support to get to the bottom of this. That way the issue you're describing will reach the right channels. It would be helpful to the community to leave a comment that summarizes what you find.
카테고리
도움말 센터 및 File Exchange에서 Printing and Saving에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!