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
 Graph for chosen values in another column
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Robson123

5 Posts

Posted - 10/22/2017 :  06:08:24 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 2017 (64bit)
Operating System: 8.1

Hi,
i use a labtalk and i have got a problem.
i have got 3 columns. I want to plot a graph with column B and C if in column A is value 0. can you help me?
I tried, but there was a mistake. I used this commands:

for (col(A)=0) {plotgrup iy:=(2,3)};

Shirley_GZ

China
Posts

Posted - 10/23/2017 :  03:37:50 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Robson,

Please try our filter tool as below:

wks.col1.filter = 1;  //Enable a filter
wks.col1.filterx$ = "XC"; // variable name we will use
wks.col1.filter$ = "XC=0"; // our filter condition
wks.runfilter(); //run the filter
plotxy iy:=(2,3); //plot filtered column B and C values


The reference pages are: http://www.originlab.com/doc/LabTalk/ref/Wks-Col-obj
http://www.originlab.com/doc/X-Function/ref/plotxy

Please let me know if any problem.

Thanks,
Shirley

Originlab Technical Service Team

Edited by - Shirley_GZ on 10/23/2017 03:39:04 AM
Go to Top of Page

Robson123

5 Posts

Posted - 10/23/2017 :  4:37:16 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Great! thank you! but i have one question yet. If i want to plot a graph with two different value from column A (for example 0 and 5)? Separate line for 0 and separate line for 5 on one graph?
Go to Top of Page

Shirley_GZ

China
Posts

Posted - 10/24/2017 :  10:51:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Then, you can use a combo condition as below:

wks.col1.filter = 1;  //Enable a filter
wks.col1.filterx$ = "XC"; // variable name we will use
wks.col1.filter$ = "XC=0 OR XC=5"; // our filter condition
wks.runfilter(); //run the filter


to filter the values, and then use plotgroup X-Function to plot the values into two lines by selecting filtered Col(A) as group data:

plotgroup iy:=(2,3) dgrp:=1;


http://www.originlab.com/doc/X-Function/ref/plotgroup

Thanks,
Shirley


Originlab Technical Service Team
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