Choose Language Hide Translation Bar
Community Trekker

How to match spline line color=marker color?

Using a bivariate, is there any easy way to match the spline line color to that of the marker color? 


In this way my example "widget1" has a green marker, but its spline line color is red.


So I thought I'd just read in the "widget1" marker color then assign it as the spline line color. (to try and match the two)  But its marker color (green/light green) gives me a large negative number like -3780931.  Now when I try assigning say -3780931 to the spline line (Line Color()) it does nothing.  Can I convert this large negative number into something meaningful like "Light Green", etc.  I'm using JMP Default for the Legend which I believe assigns the marker colors.



0 Kudos

Re: How to match spline line color=marker color?

You have to send the message for changing the line color to the curve in the plot that represents the fit. This script is the same as clicking on the red triangle for that fit beneath the plot and selecting Line Color.

Names Default to Here(1);

dt = Open( "$SAMPLE_DATA/Big" );

biv = dt << Bivariate( Y( :weight ), X( :height ) );

biv << Fit Spline( 10 );

biv << (Curve[1] << Line Color( "Yellow" ) );

Note that the message to Curve must be enclosed in parentheses and then this expression is sent to the analysis layer.


Learn it once, use it forever!
Super User

Re: How to match spline line color=marker color?

To address your specific request about the negative number color number that was retireved, you can use it directly in the code that Mark showed

biv << (Curve[1] << Line Color( -3780931 ) );

and it will change the spline value to the green color that it represents.

0 Kudos