Attach an Origin C Dataset object to the X data set associated with this Curve object.
BOOL AttachX( Dataset & dsX, BOOL SetXRangeToYRange = TRUE )
- [input] A Dataset object which is attached to the X data set of this Curve object (if any)
- [input]TRUE (default) sets the upper and lower bounds of the X data set to the upper and lower bounds of the Curve object's Y data set. This setting is temporary and may be over-ridden when using multiple Curve objects linked to the same X data set.
Returns TRUE if the Curve object has an associated X data set and the attachment is successful or returns FALSE if there is no X data set or the attachment fails.
// Assumes Book1_A(X) and Book1_B(Y) exist with the following data:
string dsName = "Book1_B";
crv.AttachX(dsX, TRUE); //If FALSE, The Minimum/Maximum X is -10/10
double xMin = min( dsX );
double xMax = max( dsX );
printf( "The Minimum X in dsX is %g \n", xMin );
printf( "The Maximum X in dsX is %g \n", xMax );
Attach an Origin C Dataset object to the X data set associated with this Curve object (if there is one) and optionally set the upper and lower bounds of the X data set to the upper and lower bounds of the Curve object's Y data set.
Dataset::Attach, Curve::Attach, Curve::Detach, DataRange::GetData, DataRange::GetNumData, DataRange::GetMaskedData, DataRange::GetMissingData
header to Include