Scale
The Scale class provides methods and properties common to all Origin axis scales. Two scale objects (one X scale and one Y scale) are contained in each graph layer on each graph page.
An Origin C Scale object is a wrapper object that is a reference to an internal Origin scale 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 Scale class is derived from the OriginObject class from which it inherits methods and properties.
EX1
void Scale_ex1() { GraphPage gp; gp.Create("origin"); GraphLayer gl(gp.GetName(),0); if(gl) // If valid graph layer... { Scale sc(gl.X); // Get X scale object from graph layer sc.From = 0.01; // Assign scale from value sc.To = 1000; // assign scale to value sc.Type = LOG10_SPACE; // Set axis scale as Log10 sc.Inc = 1; // set axis scale increment to 1 } }
origin.h
Name | Brief | Example |
---|---|---|
Scale | Default constructor which constructs an unattached Scale object. The member function IsValid() of the base class OriginObject can be used to determine if the object is valid (attached to an internal Origin axis) | Examples |
Name | Brief | Example |
---|---|---|
From | The "From" property - the left limit of the axis | Examples |
Inc | The "Inc" property - the major tick increment of the axis | Examples |
Rescale | The "Rescale" property - Rescale Type | Examples |
To | The "To" property - the right limit of the axis | Examples |
Type | The "Type" property - the axis type. | Examples |