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 for Programming
 LabTalk Forum
 Draw multiple line with scatter graph
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

elquin

Republic of Korea
7 Posts

Posted - 08/29/2017 :  04:17:42 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 2015 (64bit) Sr2
Operating System: Windows 7

I want to plot several datasets (col(2),col(5),col(6),etc.) by one Graph with line with symbol having different line type and symbol shape.

For example,
plot 1 : continuous line with square
plot 2 : dotted line with circle
...

What I want is that the way of programming by LabTalk script to set group those dataset and make the symbol shape increase by one, as shown in menu.

If there's way, please let me know.

Thanks..

Edited by - elquin on 08/29/2017 04:20:26 AM

yuki_wu

896 Posts

Posted - 08/30/2017 :  04:58:45 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

I am afraid that we haven’t a quick way to do that for now, but I think we can set the line style and symbol type for each plot respectively and then group the plots. I wrote a simple example:

//Plot col(2), col(4)
plotxy iy:=((1,2),(1,4)) plot:=202;
dataset ds = {1,2,3};
//Ungroup dataplots
layer -gu;
int n = 1;
//Loop over all data plots in the active layer
doc -e DY{
	set %C -k ds[n]; // Set plot symbol shape (Built-in symbols)
	set %C -d ds[n]; // Set the line style
	n++;
}
//Group dataplots
layer -g;


To know more information about plotting data by LabTalk, please have a look at this page:
http://www.originlab.com/doc/LabTalk/guide/Creating-Graphs#Creating_a_Graph_with_the_PLOTXY_X-Function

Hope it helps.

Regards,
Yuki
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