Subscribe Bookmark RSS Feed

How to match spline line color=marker color?

djhanson

Community Trekker

Joined:

Jun 23, 2011

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.

 

DJ

2 REPLIES
markbailey

Staff

Joined:

Jun 23, 2011

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 Class.jmp" );

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!
txnelson

Super User

Joined:

Jun 22, 2012

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.

Jim