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
 Origin Forum
 Linking Y axes in Double Y axis 2D 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
dalee Posted - 08/28/2009 : 4:32:52 PM
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 8.0.63.988 SR6
Operating System: XP Pro

I have an issue with aligning the y axes in a 2 layer common x, double y plot. While I have the graph plotted without any issues, I am having problems with adjusting the scale of the y axes. The y scale of the data is very different but I want to have the y=0 point on each of the y scales aligned. I have been trying the link options in the layer management tool but if this is the right area to be looking, I cannot find how to do this.
I hope somebody will be able to help with this.
Thanks in advance
2   L A T E S T    R E P L I E S    (Newest First)
dalee Posted - 08/30/2009 : 05:30:21 AM
That works fine.
Thanks for the help
easwar Posted - 08/28/2009 : 5:22:01 PM
Hi,

It may not be possible to set up a linking formula to achieve this.

So script code such as below could work, which simply gets the from and to y values of the two layers and sets the to value of the 2nd layer such that the zero position matches, it assumes of course zero is present in both ranges.

To use this, first set the From value of your 2nd layer Y axis to a suitable value, then copy these lines to script window, select them all and press Enter to execute.


// Make layer 1 active and get the from and to y values
page.active=1;
yy1=y1; yy2=y2;
// Make layer 2 active and get the from y value
page.active=2;
yy3=y1;
// Compute the new to y value
yy4=yy3+yy3*(yy2-yy1)/yy1;
// Set the new to y value
y2=yy4;


You can then keep changing the from value of 2nd layer and keep running this script again and again till you get a suitable range to cover all of the data in the 2nd layer.

Easwar
OriginLab

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