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
 normalize to display two dataset in one graph
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Ray111

Israel
Posts

Posted - 06/08/2005 :  01:50:10 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi

I have two graph (and dataset) that have same x axis while y axis is different ( say 1000 and 5000).

How I can display both of them in same graph using Labtalk. (origin 6.1)
( i,e I want Normalize 1st one wrt 2nd one )

I dont mind to normalize the first one ( say multiply y axix of 1st by 5 to fit inside the same 5000 axis)

azazell0

Hungary
Posts

Posted - 06/08/2005 :  05:08:24 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

It seems you don't need to normalize anything. You should add a linked layer with a new Y axis to your existing (and active) graph:

layer -n Y;

On setting scale values consult the Layer.Axis object help.

Edited by - azazell0 on 06/08/2005 06:50:02 AM
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 06/08/2005 :  11:28:07 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Here's an easy way to plot both curves in the same layer. It adds the curve from Graph2 to Graph1 and normalizes it to the first curve in Graph1. Note: this actually changes the Y values of the second curve so azaell0's solution might be preferable.

win -a Graph2; // activate Graph2
%A=%C; // find the name of active curve
win -a Graph1; // activate Graph1
sum(%C); // basic stats on active curve
norm=sum.max; // max of first curve
sum(%A); // basic stats on second curve
norm/=sum.max; // divide norm by max
(%A)*=norm; // normalize second curve
lay -i %A; // add it to Graph1

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 06/08/2005 11:36:37 AM
Go to Top of Page

Ray111

Israel
Posts

Posted - 06/08/2005 :  3:14:32 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
azazell0 and Mike thanks a lot for perfect tips.
really appreciated.

Mike I really liked the script.
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