The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 Plot saved as an SVG image misbehaving in TeX

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
szymonbartus Posted - 03/04/2025 : 12:37:06 PM
Origin Version: OriginPro 2023
Operating System: Windows 10 Pro

I'm trying to insert a plot made in Origin (OriginPro 2023) and saved as an SVG file into a LaTeX document (using a package "svg") but I can't get it to work correctly. The result is that the plot is extremely shrunk (despite the width is specified as the text with) and the top is cut off. At the moment it looks like the fault is on the side of Origin because when I quickly drew an image in Inkscape and saved it as an SVG file, it could be inserted correctly. You can see the details as well as well as download the plot as SVG here:
https://tex.stackexchange.com/questions/738268/unable-to-insert-a-plot-from-origin-saved-as-an-svg-file-with-the-svg-package

What do you think might be the problem? Is this a bug in Origin? My university allows me to upgrade to OriginPro 2024 at the moment (no 2025 version yet).
5   L A T E S T    R E P L I E S    (Newest First)
NicholasSupport Posted - 03/05/2025 : 3:55:06 PM
Hi szymonbartus,

I confirm the issue and have made ORG-30860 SVGs from Origin can have display issues in some LaTeX documents so we can work on identifying the issue.

Thank you for telling us about the issue.

In the meantime, let me know if you want to discuss some possible workarounds for you.

Best,

Nicholas G.
nicholas@originlab.com
OriginLab Technical Support Team
szymonbartus Posted - 03/05/2025 : 12:49:42 PM
I'm using Overleaf with LuaLaTeX as a compiler. Switching the compiler to pdfLaTeX didn't help. Switching to plain LaTeX compiler helped only to some extent - the image has the correct width but the top is still cut off.
NicholasSupport Posted - 03/05/2025 : 11:51:46 AM
quote:
Originally posted by szymonbartus

Yes, the SVG image is displayed correctly when opened in Inkscape or inserted in MS Word.

These are the files:
Origin .opju file: https://www.dropbox.com/scl/fi/88j2o2bws8684jo6auvle/red-P-comparison.opju?rlkey=3d1lxxra6ilaxc40ij90l69b2&st=w27uunb3&dl=0
SVG file: https://www.dropbox.com/scl/fi/px37chfxlcybp5jppz8xu/XRD-patterns-red-P.svg?rlkey=qifrjuj8l8h5azsvgmyxcai1l&st=tkvqigrj&dl=0
LaTeX file: https://www.dropbox.com/scl/fi/3y91vg2s12ecxrlcd6845/example.tex?rlkey=hybdtem0omtxqhhlgpmyj711u&st=izjkv2yb&dl=0

Update: I've just managed to upgrade to OriginPro 2025 SR1 (v. 10.2.0.196). The SVG file generated behaves exactly the same unfortunately.



Hi szymonbartus,

Which distribution of LaTeX are you using? I am trying to recreate exactly to troubleshoot.

Nicholas G.
nicholas@originlab.com
OriginLab Technical Support Team
szymonbartus Posted - 03/05/2025 : 04:47:04 AM
Yes, the SVG image is displayed correctly when opened in Inkscape or inserted in MS Word.

These are the files:
Origin .opju file: https://www.dropbox.com/scl/fi/88j2o2bws8684jo6auvle/red-P-comparison.opju?rlkey=3d1lxxra6ilaxc40ij90l69b2&st=w27uunb3&dl=0
SVG file: https://www.dropbox.com/scl/fi/px37chfxlcybp5jppz8xu/XRD-patterns-red-P.svg?rlkey=qifrjuj8l8h5azsvgmyxcai1l&st=tkvqigrj&dl=0
LaTeX file: https://www.dropbox.com/scl/fi/3y91vg2s12ecxrlcd6845/example.tex?rlkey=hybdtem0omtxqhhlgpmyj711u&st=izjkv2yb&dl=0

Update: I've just managed to upgrade to OriginPro 2025 SR1 (v. 10.2.0.196). The SVG file generated behaves exactly the same unfortunately.
snowli Posted - 03/04/2025 : 12:52:58 PM
Does the image show fine in Word, PPT, etc.?
Do you mind sharing your opju file and problematic SVG file so we can look into it?

I saw we added some system variable in 2024
@SVGD: It enable the fix for SVG’s Dimension size issue. Set @SVGS = 0 to old behavior
https://www.originlab.com/doc/LabTalk/ref/sys-var-list?f=dl

Maybe you can upgrade to 2024 to check?


Thanks, Snow

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000