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
 String as graph name
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

alkamid

Poland
27 Posts

Posted - 11/03/2010 :  5:20:50 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,

How to properly name graphs with strings? Let's assume I have a string letter$ = x. Then I try this:
graphname$ = "mygraph" + letter$;
plotxy iy:=(1,5) plot:=200 o:=[graphname$];
win -a graphname$;

It's wrong because I get an error:
Error:win -a graphname$


What's the correct syntax?

VincentLiu

China
Posts

Posted - 11/04/2010 :  03:16:28 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply

You could use the following commands to create a new graph with a given name.

letter$ = test;
graphname$ = "mygraph" + letter$;
plotxy iy:=(1,5) plot:=200 ogl:=[<new name:=%(graphname$)>];
win -a %(graphname$);



Vincent
OriginLab Technical Services
Go to Top of Page

alkamid

Poland
27 Posts

Posted - 11/04/2010 :  04:58:59 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you!
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