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
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Problem with IDM_PLOT_SCATTER and Size of Points

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Blackbird Posted - 11/23/2004 : 08:32:16 AM
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
2   L A T E S T    R E P L I E S    (Newest First)
Blackbird Posted - 11/23/2004 : 10:55:50 AM
Thank you very much, it works nice :).

MFG

Matthias Vierling
easwar Posted - 11/23/2004 : 09:51:27 AM
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;
}




The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000