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
 1:1 slope reference line
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

ghoy

USA
3 Posts

Posted - 08/17/2013 :  12:34:07 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,

I'm working with regression and correlation scatter plots. Is there a way to add a line that has slope of 1 and goes through the origin of the plot. I want to do this for multiple plots so I'd prefer to use existing options (software options). However, I'm open to new suggestions.

Thanks
Ghoy

Shirley_GZ

China
Posts

Posted - 08/19/2013 :  04:58:25 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You can run the below script to add such line for all layers in current project:

//Loop all layers in current project.
doc -e L 
{
  draw -l {-1, -1, 1, 1};  //draw a line object from the point(-1,-1) to the point (1,1) on the current layer. 
};


Originlab Technical Service Team

Edited by - Shirley_GZ on 08/19/2013 05:06:28 AM
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 08/22/2013 :  12:10:58 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Here is another version of Shirley's script - which draws a Y=X function plot on ANY XY range:
create myyeqx -f 100 "x";  //100 points on y=x curve
doc -e P
{
  plotxy myyeqx 200 ogl:=1;  //200:Line, Put rescale:=1 to rescale
};
Hope this also helps.

--Hideo Fujii
OriginLab
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