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
 normalize to display two dataset in one graph

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
Ray111 Posted - 06/08/2005 : 01:50:10 AM
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)

3   L A T E S T    R E P L I E S    (Newest First)
Ray111 Posted - 06/08/2005 : 3:14:32 PM
azazell0 and Mike thanks a lot for perfect tips.
really appreciated.

Mike I really liked the script.
Mike Buess Posted - 06/08/2005 : 11:28:07 AM
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
azazell0 Posted - 06/08/2005 : 05:08:24 AM
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

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