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
 several worksheets, one plot
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

jennz

Australia
Posts

Posted - 08/27/2009 :  05:43:47 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I have several worksheets of data, does anyone know the Labtalk code to plot different columns from different worksheets onto the same graph?

Cheers!

Shirley_GZ

China
Posts

Posted - 08/28/2009 :  03:57:31 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Jennz,

You can use the X-Function plotxy, please see the help page here. http://wiki.originlab.com/~originla/wiki2/index.php?title=X-Function:plotxy

You also can see some examples in this help page. http://wiki.originlab.com/~originla/wiki/index.php?title=LabTalk:Plotting#plotxy

Thanks,
Shirley

Originlab Technical Service Team
Go to Top of Page

jennz

Australia
Posts

Posted - 08/31/2009 :  07:42:17 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks Shirley,

Forgot to mention I'm using Origin 5 and 6. Anyway, I tried the plotxy command, which had no effect. I tried

plotxy iy:=(1,2);

and

layer.plotxy(1,2[,201]);

neither of which gave a plot. Am I using the command wrong? I tried putting win -t plot; and then selecting the worksheet win -a Data3; still didn't work. The help file says to use layer.plotxy(Xdataset,Ydataset[,PlotType]) but I'm not sure what the Xdataset and Ydataset are and nothing I tried works.

I just have two worksheets of data, and want to plot column 2 of Data1 and Data2 on the same graph. Would you be able to give me some example code that works?

Thanks!
Go to Top of Page

greg

USA
1378 Posts

Posted - 08/31/2009 :  12:45:19 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
X-Functions are only found in Origin 8.

Here is an example using earlier versions of Origin:

win -t plot column; // Load a template - here, the COLUMN template
// Assuming standard column names A, B
// Plot column 2 (B) as Y vs. column 1 (A) as X for each worksheet
layer.plotxy(book1_a,book1_b,203); // 203 is the PlotID for columns
layer.plotxy(book2_a,book2_b,203);
layer -g; // If you wish to group the curves
layer -a; // You will need to rescale
Go to Top of Page

jennz

Australia
Posts

Posted - 08/31/2009 :  10:38:28 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you! It now works fine, hopefully last question - I'm doing a line plot, how do I change the width to thicker?
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