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
 Reference line expression
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

AKazak

Russia
1205 Posts

Posted - 02/02/2021 :  2:43:10 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
OriginPro 2021b (64-bit) Beta1 9.8.5.53
Windows 7 Pro x64 SP1

Greetings!

I created a 1-to-1 crossplot graph comparing X to Y values.
Not I want to develop expressions for reference lines in blue showing the narrowest corridor parallel to bisect including all data points:


To me, it seems that that the expression for the lower line is:
x-L, where L=abs(min(plotdata(1, Y)-plotdata(1, X)))


However, this doesn't seem to be working.
Can you suggest an effective workaround, please?

Thank you.

---
Andrey

YimingChen

1618 Posts

Posted - 02/02/2021 :  3:00:24 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
works for me. Do you have more than one plots on the graph?


James
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 02/02/2021 :  3:33:56 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by YimingChen

works for me. Do you have more than one plots on the graph?
James



Dear James,

Hm... I started working fine for me as well.
I will keep an eye on this.

How do I output the resulting expression (or at least L value) as a reference line label?

---
Andrey
Go to Top of Page

YimingChen

1618 Posts

Posted - 02/02/2021 :  3:48:02 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
On the same Reference Lines setting dialog, find the Label node, and check the box Show. It will show the formula of the line.

James
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 02/03/2021 :  4:24:48 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by YimingChen

On the same Reference Lines setting dialog, find the Label node, and check the box Show. It will show the formula of the line.

James



Yes, it shows the general formula. However, it would be great to display the effective equation for the particular line.
Besides the default font settings option would also be useful.

---
Andrey
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 02/04/2021 :  1:03:47 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
How do I add a text object showing the result of the following calculation for a scatter plot to the graph?

abs(min(plotdata(1, Y)-plotdata(1, X)))


Thank you.

---
Andrey
Go to Top of Page

YimingChen

1618 Posts

Posted - 02/04/2021 :  2:49:30 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You can add a text object and use a piece of LT script, see below:

range -wx rx = 1;
range -wy ry = 1;
Text.text$ = $(abs(min(ry-rx)), .2);




James
Go to Top of Page

YimingChen

1618 Posts

Posted - 02/04/2021 :  3:10:20 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Well, in reference line setting, you can also use $() substitution to get the value.



James
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 02/08/2021 :  11:09:24 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by YimingChen

Well, in reference line setting, you can also use $() substitution to get the value.
James



Dear James,

Great news!
It is worth adding to help about on Reference Lines.

---
Andrey
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 02/08/2021 :  11:13:24 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
This is how the resulting text object looks like:


---
Andrey
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