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 plot for multiple X,Y points per person
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

kloostep

Netherlands
2 Posts

Posted - 02/01/2017 :  07:43:47 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi there,

I’m trying to plot individual lines per person through multiple x,y points per person over time. In this case x- and y-values are both cumulative scores at the same time point. So all first measurements start at 0,0 for x,y. The number of x,y points available varies per person.

Using the workbook setup depicted here: http://imgur.com/a/iB3LU (Imgur link because image upload of the forum is offline) and selecting a simple Line + Symbol graph I pretty much end up with the graph I intended, with one exception: For some reason Origin also draws a line from the first intersection to the third intersection (e.g., to x,y=120,80 for the person ID=1) or another (random?) follow-up intersection (e.g., to x,y 1500,100 for person ID=4).

I need a graph with only the lines drawn between subsequent x,y intersections per person, but can’t seem to manage this. Anyone know how to do this?


PtK

cpyang

USA
1406 Posts

Posted - 02/01/2017 :  11:29:45 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Simplest solution is to insert a row between each person and fill missing values. Line symbol plot will break at missing values.

CP
Go to Top of Page

snowli

USA
1385 Posts

Posted - 02/01/2017 :  3:53:22 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Origin has an x-function to plot data based on grouping informration
http://www.originlab.com/doc/X-Function/ref/plotgroup
into multiple graph/layer or different data.

Highlight your B and C columns. Then choose Window: Script Window.
Run
plotgroup -d to open the dialog

In the dialog, click the > next to Column for Data Group and pick the grouping column A.

Make sure input is your B(X) and C(Y).

Plot type: Line+Symbol.


It will plot each group like an individual plot. Even plot color is based on grouping infor. You can open PD. On Group tab, set Line color Incrment to None so they are all black.


Thanks, Snow
Go to Top of Page

kloostep

Netherlands
2 Posts

Posted - 02/02/2017 :  12:19:20 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you very much for the quick help cpyang and snowli!

Both solutions (inserting an empty row between each person and the plotgroup function) work perfectly. Especially the latter solution is elegant and requires less data prepararation.


Problem solved!

PtK
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