안녕,
선 그래프의 한 점에서 수직 및 수평 투영선을 그리고 동일한 그래프의 두 번째 선에 대한 교차점 좌표(X 및 Y)를 찾으려고 합니다. 지금은 그래프를 시각화하여 수동으로 이 작업을 수행했지만 Jmp가 X/Y 값을 자동으로 반환할 수 있는 방법이 있는지 궁금합니다.
이 예에서는 보라색 선 차트에서 빨간색 선을 수동으로 그렸고 녹색 선과 파란색 선에서 교차하는 위치를 찾고 싶습니다.

다음은 예제 데이터 테이블을 가져와 각 실험의 데이터 포인트를 통해 스플라인 맞춤을 캐스팅한 다음 실험 2(파란색)에서 실험 1(보라색)까지 선을 그릴 수 있는 매우 단순한 버전의 스크립트입니다. 그런 다음 다시 실험 2로 넘어갑니다.

스크립트를 실행한 후 "Exter X value" 입력 상자에 값을 입력하고 "create line"을 클릭합니다.
단추. 이것은 매우 원시적인 스크립트이며 약 2.5에서 4 사이의 X 값에 대해서만 작동합니다. 그러나 원하는 것을 구축할 수 있는 방법에 대한 아이디어를 제공합니다.
Names Default To Here( 1 );
// Create the sample data table
dt = New Table( "Sample",
Add Rows( 13 ),
New Column( "Experiment",
Character,
"Nominal",
Set Values(
{"exp1", "exp1", "exp1", "exp1", "exp2", "exp2", "exp2", "exp2", "exp3", "exp3", "exp3", "exp3", ""}
)
),
New Column( "V",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [0.55, 0.65, 0.85, 1.1, 0.55, 0.65, 0.85, 1.1, 0.55, 0.65, 0.85, 1.1, .] )
),
New Column( "X-axis",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [2.16, 2.79, 3.66, 4.19, 2.47, 3.13, 4.15, 4.72, 2.35, 2.95, 3.88, 4.36, 3] )
),
New Column( "Y-axis",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [1.183, 2.12, 5.28, 11.2, 1.03, 1.85, 4.54, 9.25, 1.07, 1.93, 4.88, 9.74, .] )
)
);
nw = New Window( "Draw Lines",
hlb = H List Box(
// Generate the graph with the curves
Biv = dt << Bivariate( Y( :Name( "Y-axis" ) ), X( :Name( "X-axis" ) ) ),
V List Box(
Spacer Box( size( 1, 30 ) ),
H List Box( tbMain = Text Box( "Enter X value" ), neb = Number Edit Box() ),
Button Box( "Create Line",
start = neb << get;
// Create a list to hold the starting x,y pair
List1a = {};
List1a[1] = start;
// Find the Y value on experiment 2
fit2Y = Spline Eval( start, fitMat2 );
list1a[2] = fit2y;
// Create a list to hold the second x,y pair
list1b = {};
list1b[1] = start;
fit1Y = Spline Eval( start, fitMat1 );
list1b[2] = fit1Y;
// Create a list to hold the third x,y pair, which
// is the same as the second x,y pair
list2a = list1b;
// Create the 4th x,y pair
// to find the final X value, an iteration of the
// experiment 2 spline has to be done until it
// is larger than the experiment 1 Y value
list2b = {};
count = 0;
While( fit2Y < fit1Y | count > 300,
count++;
fit2Y = Spline Eval( start + (.01 * count), fitMat2 );
);
// set the final x,y values
list2b[1] = start + (.01 * count);
list2b[2] = fit1Y;
// Draw the lines
Report( biv )[FrameBox( 1 )] << add graphics script(
Pen Color( "red" );
Pen Size( 2 );
Line( list1a, list1b );
Line( list2a, list2b );
);
)
)
)
);
// add the spline fits and get the prediction matricies for each spline
biv << Fit Where( :Experiment == "exp1", Fit Spline( 0.001, {Line Color( "Purple" ), save coefficients} ) );
fitMat1 = Current Data Table() << get as matrix;
Close( Current Data Table(), nosave );
biv << Fit Where( :Experiment == "exp2", Fit Spline( 0.001, {Line Color( "Medium Dark Blue" ), save coefficients} ) );
fitMat2 = Current Data Table() << get as matrix;
Close( Current Data Table(), nosave );
biv << Fit Where(
:Experiment == "exp3",
Fit Spline( 0.001, {Line Color( "Medium Dark Green" ), save coefficients} )
);
fitMat3 = Current Data Table() << get as matrix;
Close( Current Data Table(), nosave );