Hi,
Is there a way to get the spline fit curve name (i.e, if we group the fitting by a certain column).
I searched and the only way I found how to reference a curve is by its index number.
E.g.
obj = Bivariate(Y( :Weight ), X( :Height ), Fit Line);
obj << (Curve[1] << Line Width ( 2 ));
I thought I could get away with this by using this code where I just create a list from grouping column.
groupcol=Column(dt, "Group Col Name");
Summarize( A = by( groupcol ) );
B = groupcol << get property( value ordering );
If( Is Empty( B ),
GroupList = A,
GroupList = B
);
Hence, GroupList[1] would refer to Curve[1], GroupList[2] would refer to Curve[2], and so on..
However, I saw one problem with this. If GroupList[2] has too few points so that a spline fit cannot be done, Curve[2] will actually belong to GroupList[3]! So I realized this isn't really the way to do it.
Therefore, here are my questions:
1. Supposed I create a script that does spline fit by a certain grouping column (e.g. a column which contains "Red", "Blue", "Green", "Yellow"), is there a way to know the ff:
1.1 How many spline fits were drawn?
1.2 Which spline fit belongs to which group? (I.e, does Curve[2] belongs to "Blue" or to "Green" or "Yellow")?
Thank you.