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
 Plot Long 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
_Sigma Posted - 06/25/2009 : 7:44:08 PM
Origin Ver. and Service Release (Select Help-->About Origin): 8
Operating System: xp

I have a workbook with multiple sheets. Each column of each sheet is Y. Plotting using an implicit X.

I am plotting via

for (int ii=3; ii<=wkbname$!wks.ncols; ii++)
{
plotxy [wkbname$](1:end)!($(ii)) plot:=200 ogl:=[<NEW>]!;
}

to get the same column from all worksheets onto one graph.

However, I'd like to rename the graph to the long name of the column.
If I put this under the plot and assign it to the name
[workbook$]1!wks.col($(ii))[L]$
it ends up returning "[wkbname$](1:end)!($(ii)) plot:=200 ogl:=[<NEW>]!"

Any ideas?
1   L A T E S T    R E P L I E S    (Newest First)
cpyang Posted - 06/27/2009 : 10:11:47 PM
The following code should do the trick, it will work by using worksheet column designation, so if there is no X, then it will plot with implicit X.


string wkbname$="Book1";
range wks1=[wkbname$]1!; // 1st sheet
for (int ii=3; ii<=wks1.ncols; ii++)
{
	range y1 = [wkbname$]1!wcol(ii);//take LN from 1st sheet
	string strColLN = y1[L]$;
	plotxy [wkbname$](1:end)!(?, $(ii)) plot:=200 ogl:=[<NEW>]!;
	//result plot is the active window
	page.LongName$=strColLN$;
}


See this link for the XYRange notation of (?,col) for the implicit designations.

http://wiki.originlab.com/~originla/wiki/index.php?title=LabTalk:Range_Notation#Special_Notations_with_XYRange_using_.23_and_.3F_for_X


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