The GraphLayer class provides methods and properties common to all Origin graph layers.
Internal Origin graph pages contain one or more graph layers thus the Origin C GraphPage class contains a collection of one or more GraphLayer objects. Origin graph layers may contain Origin data plots thus the Origin C GraphLayer class contains a collection of DataPlot objects.
An Origin C GraphLayer object is a wrapper object that is a reference to an internal Origin graph layer object. Origin C wrapper objects do not actually exist in Origin and merely refer to the internal Origin object. Consequently, multiple Origin C wrapper objects can refer to the same internal Origin object.
The GraphLayer class is derived from the Layer and OriginObject classes from which it inherits methods and properties.
//Draw a dataplot and change the color to green.
GraphLayer gl(gp.GetName(), 0);
DataPlot dp = gl.DataPlots(0); // Get first data plot in graph layer
dp.SetColor(2); // Change color to green