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
 Forum for Origin C
 masking and plotting data
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

akerstan

Germany
2 Posts

Posted - 05/08/2009 :  08:15:02 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver.8G and Service Release v8.0951
Operating System: XP

Hello everybody,

I am trying to write a program for graphing some data.
The problem is that some of the data in the column I want to plot is useless. Therefor I want to mask it.

At first I chose the data to mask:


string c1="worksheet -s 11 1 11 167";
LT_execute(c1);

string c2="mark -w1 Book1";
LT_execute(c2);

string c3="worksheet -s 11 640 11 -1";
LT_execute(c3);

string c4="mark -w1 Book1";
LT_execute(c4);

And now I want to get a plot where I can see the left data points.


Curve crv1(wks, 0, 10);
GraphPage gpg;

gpg.Create("Origin");

GraphLayer gly = gpg.Layers();


gly.AddPlot(crv1);

DataPlot dp = gly.DataPlots(-1);

dp.SetRange(100, 200);

gly.Rescale();


After I executed my program I have got the data masked in the column but can still see it in my plot...

Please... Is there somebody with an idea?

greg

USA
1379 Posts

Posted - 05/26/2009 :  4:17:23 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The display of Masked datapoints is handled by the @MP system variable.
When set to 0, masked points will display in the current mask color.
When set to 1, masked points will not display in a graph. (They do still display in a worksheet.)

In Origin C, you can use the LT_Set_Var function to manipulate @MP:

LT_Set_Var("@MP", 0); // Display masked points in graph
LT_Set_Var("@MP", 1); // Hide masked points in graph

You will need a refresh after execution.
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