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 for Programming
 LabTalk Forum
 How to use drawing templates to draw graphics?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

delete

China
2 Posts

Posted - 04/28/2025 :  05:28:29 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin version is OriginPro 2024 (64-bit) SR1, and the operating system is Windows 10. I've written a LabTalk code. Its purpose is to iterate through all the matrices in the project file, then use the plotting template to perform batch plotting on the matrices. The name of the graph window should be copied as the long name of the matrix. The key question is how to use drawing templates to draw graphics?

doc -e M
{
window -a %H;
string longName$ = page.longname$;
win -t plot C:\Users\Nordoo\Desktop\intensity.optu;
win -r %(page.name$) %(longName$);
}

YimingChen

1664 Posts

Posted - 04/29/2025 :  3:25:13 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You can use the plotm xfunction. Try the script below where MyTemplate is your saved template. Please also refer to the: https://www.originlab.com/doc/zh/X-Function/ref/plotm
///
doc -e M
{
window -a %H;
string longName$ = page.longname$;
plotm im:=1!1 plot:=226 ogl:=<new template:=MyTemplate>;
win -r %(page.name$) %(longName$);
}
///

James
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