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 for Programming
 LabTalk Forum
 String as graph name

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
alkamid Posted - 11/03/2010 : 5:20:50 PM
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?
2   L A T E S T    R E P L I E S    (Newest First)
alkamid Posted - 11/04/2010 : 04:58:59 AM
Thank you!
VincentLiu Posted - 11/04/2010 : 03:16:28 AM

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

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