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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Plot saved as an SVG image misbehaving in TeX
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

szymonbartus

Poland
3 Posts

Posted - 03/04/2025 :  12:37:06 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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).

Edited by - szymonbartus on 03/05/2025 04:43:25 AM

snowli

USA
1411 Posts

Posted - 03/04/2025 :  12:52:58 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

szymonbartus

Poland
3 Posts

Posted - 03/05/2025 :  04:47:04 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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.

Edited by - szymonbartus on 03/05/2025 05:59:59 AM
Go to Top of Page

NicholasSupport

USA
87 Posts

Posted - 03/05/2025 :  11:51:46 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

szymonbartus

Poland
3 Posts

Posted - 03/05/2025 :  12:49:42 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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.
Go to Top of Page

NicholasSupport

USA
87 Posts

Posted - 03/05/2025 :  3:55:06 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000