How to input specify contours using JSL?Hello everyone.
I have a question about making contour plot.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Contour Plot(
X( :height, :weight ),
Y( :age ),
Legend( 2 ),
Show Contours( 1 ),
Show Data Points( 0 ),
Fill Areas( 1 ),
Label Contours( 0 ),
Color Theme( "Blue White Red" ),
Specify Contours( Min( Column( dt, Y( :age ) )[3] ), Max( Column( dt, Y( :age ) )[4] ), N( 10 ) ),
//Specify Contours( Min(0 ), Max(100 ), N( 10 ) ),
SendToReport(
Dispatch(
{},
"1",
),
Dispatch(
{},
"2",
),
Dispatch( {}, "meow", TextEditBox, {Rotate Text( "Horizontal" )} ),
Dispatch(
{},
"Contour Plot Graph",
FrameBox,
{Frame Size( 700, 700 ), Marker Size( 2 ), Marker Drawing Mode( "Normal" ),
Marker Selection Mode( "Unselected Faded" )
}
),
Dispatch( {}, "", AxisBox( 2 ), {Add Axis Label( "-First-" )} ),
Dispatch( {}, "Contour Legend", FrameBox, {Frame Size( 101, 87 )} )
)
);I want to input spec using the value in the current table.
ex) Column(dt, Y( :age ))[4]
Could you please give me any advice?
Data TableGraphicsScriptingRe: How to input specify contours using JSL?Dear Ian.
I have a question more.
Could you please check my code?
I don't know why the spec is fixed which first selected item.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
win = New Window( "Select Item(s)",
<<MODAL></MODAL> Specify Contours( Min(Column( dt,Eval(xvar))[3]), Max( Column( dt, Eval( xvar))[4]), N( 10 ) ),
SendToReport(
Dispatch(
{},
"1",
),
Dispatch(
{},
"2",
),
Dispatch( {}, "meow", TextEditBox, {Rotate Text( "Horizontal" )} ),
Dispatch(
{},
"Contour Plot Graph",
FrameBox,
{Frame Size( 700, 700 ), Marker Size( 2 ), Marker Drawing Mode( "Normal" ),
Marker Selection Mode( "Unselected Faded" )
}
),
Dispatch( {}, "", AxisBox( 2 ), {Add Axis Label( "-meow-" )} ),
Dispatch( {}, "Contour Legend", FrameBox, {Frame Size( 101, 87 )} )
)
);Please help me.
@ian_jmp
Re: How to input specify contours using JSL?Thanks to your check, I can solve this problem!
Thank you.Re: How to input specify contours using JSL?Looks like your syntax is slightly off. Try something like:
dt << Contour Plot(
X( :height, :weight ),
Y( :age ),
Legend( 2 ),
Show Contours( 1 ),
Show Data Points( 0 ),
Fill Areas( 1 ),
Label Contours( 0 ),
Color Theme( "Blue White Red" ),
Specify Contours( Min( Column( dt, "age" )[13] ), Max( Column( dt, "age" )[29] ), N( 10 ) )
);