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
 Problem with IDM_PLOT_SCATTER and Size of Points
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Blackbird

Germany
Posts

Posted - 11/23/2004 :  08:32:16 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5
Operating System: Win XP

Hello, I have a litte Problem with the Funktion IDM_PLOT_SCATTER. I want to make a scatter diagram in OriginC. The normal Funktion act's fine. But how can i Change the Size of my Points in this diagram? I dont want to make this by changing all values in the format window in origin himself, I want to make this automaticaly. My funktion looks so.

for (i=0; i<iNumSelFiles; i++)
{
Curve crvData(wksData, Winkel[i] , FN[i]);
grphLayer.AddPlot(crvData,IDM_PLOT_LINE);
sCmd.Format("legend -s;");
grphLayer.LT_execute(sCmd);
grphLayer.DataPlots(i-1).SetColorRGB(i+i*5, i+i*16, i*20, TRUE);
}

I cant find anything for this problem in the Origin Help or anywhere else :(.

I'am very thankful if anybody could help me. And sorry for my bad english :(..

MFG
Matthias Vierling

easwar

USA
1965 Posts

Posted - 11/23/2004 :  09:51:27 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Matthias,

You can use code such as posted below, where I am getting the properties of the first dataplot in active layer into a tree object. You can then change the tree branch values and set the tree back to apply the changes. Or once you know what properties are available for a data plot, you can also directly set them as shown in the last line of the code.

Easwar
OriginLab


void test()
{
// Declare active layer as a graph layer and check validity
GraphLayer gly = Project.ActiveLayer();
if( !gly ) return;

// Point to the first data plot in layer and check validity
DataPlot dp = gly.DataPlots( 0 );
if( !dp ) return;

// Get the format properties of the data plot into a tree
Tree trFormat;
trFormat = dp.Curve;
// Dump the tree to script window to see what you have access to
out_tree( trFormat );

// You can then make changes to the tree and set it back to apply the changes
trFormat.Symbol.Size.nVal = 12;
dp.Curve = trFormat;

// Or, once you know what is available by looking at the tree dump,
// you can also set the properties directly without using the tree
dp.Curve.Symbol.Shape.nVal = 3;
}



Go to Top of Page

Blackbird

Germany
Posts

Posted - 11/23/2004 :  10:55:50 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you very much, it works nice :).

MFG

Matthias Vierling
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