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
 Line connect between points within same x position
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Atedge

18 Posts

Posted - 04/30/2021 :  10:57:57 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 2021 (64-bit) 9.8.0.200
Operating System: Windows 10 20H2 (19042.928)
How to not connect line between two adjacent data points have same (or nearly same) x coordinates? It's not a problem of "Connect line across Missing Data", and I've known how to manually remove line between two points as FAQ-957(https://www.originlab.com/doc/Quick-Help/Break-Line-between-Two-Points)] and FAQ-986(https://www.originlab.com/doc/Quick-Help/Remove-Line-Between-Points) show. But is there a setting or checkbox to control this behavior or a new connect line type can behave like this in the plot properties dialog?
Below shows an example graph, there are a few vertical line connections at the boundary of the plot(highlighted with blue circles).

Edited by - Atedge on 04/30/2021 10:59:33 AM

YimingChen

1592 Posts

Posted - 04/30/2021 :  12:31:10 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
There is no such option. As a workaround, maybe you can run a piece of Labtalk script to detect those adjacent data points and insert an empty row between. Then make the plot. Suppose Col(A) is your x column, you can go to menu Window:Script Window. Copy paste the script below, highlight all lines and click Enter to run. See if empty rows are inserted.


for (int i = wks.nrows; i>0; i--) {
	if(col(A)[i] == col(A)[i-1]) {
		wks.insertRows(i);
	}
}


James

Edited by - YimingChen on 04/30/2021 12:31:39 PM
Go to Top of Page

Atedge

18 Posts

Posted - 05/06/2021 :  01:10:09 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for your workaround, it works like a charm!
quote:
Originally posted by YimingChen

There is no such option. As a workaround, maybe you can run a piece of Labtalk script to detect those adjacent data points and insert an empty row between. Then make the plot. Suppose Col(A) is your x column, you can go to menu Window:Script Window. Copy paste the script below, highlight all lines and click Enter to run. See if empty rows are inserted.


for (int i = wks.nrows; i>0; i--) {
	if(col(A)[i] == col(A)[i-1]) {
		wks.insertRows(i);
	}
}


James

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