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
 How can I set the symbol shape in a Line+Symbol pl
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

heo2sh

Germany
1 Posts

Posted - 12/09/2003 :  08:26:23 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I want to set the symbol shape in a line+symbol plot.
I use this command to add a plot:
int nPlot = grphLayer.AddPlot(crvData,IDM_PLOT_LINESYMB);
How can I set the type of the symbol?

Mike Buess

USA
3037 Posts

Posted - 12/09/2003 :  3:02:10 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I'm not sure that there is an Origin C method for setting the symbol type yet. You might have to use LT_execute("set datasetname -k symbolindex").

Mike Buess
Origin WebRing Member
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 12/09/2003 :  7:35:31 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The Theme access from OC can be used, which we currently do not have documentation. Try the following code and set break point to the code and can see the details of the Tree and all can be controlled.



void scatter_plot(int ntype)
{
Worksheet wks("Data1");
Curve crvData(wks, 0, 1); // plot A(x) B(y)
GraphPage gp;
gp.Create(NULL, CREATE_HIDDEN); // default template, create as hidden to avoid unneeded drawing
GraphLayer glay = gp.Layers();
int nPlot = glay.AddPlot(crvData, IDM_PLOT_LINESYMB);
glay.Rescale();

DataPlot dp = glay.DataPlots(nPlot);

Tree tr;
tr = dp.Curve; // get the internal Curve branch of Theme Tree
tr.Symbol.Shape.nVal = ntype; // set symbol type, same as in Theme
dp.Curve = tr; // update surface branch from tree
gp.SetShow();// show it when all it ready
}




To learn about Theme,
1. right click on symbol and choose Save Format as Theme,
2. when dialog open, uncheck All then check the "Symbol Line and Fill", this will filter out the Theme to a smaller set.
3. click the Edit button (pencil) to open the tree


CP



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