Hi,
In Origin C, the GraphObject class provides methods and properties common to control Origin graph objects.
I wrote a simple example that may help to understand:
void AddText()
{
GraphPage gp;
gp.Create("Origin");
GraphLayer gl = gp.Layers(0); // get the first layer
if(gl)
{
// add a Text named MyText
GraphObject go = gl.CreateGraphObject(GROT_TEXT);
go.SetName("MyText");
if( go )
{
go.Text = "This is a new label.";
go.Top = 100;
}
gl.GetPage().Refresh();
}
}
Please go to these pages for more details:
http://www.originlab.com/doc/OriginC/ref/GraphObject
http://www.originlab.com/doc/OriginC/examples/Add-Graph-Object
Regards,
Yuki
OriginLab