.csv 파일의 X 좌표에서 여러 범위의 델타를 계산하고 그래프 또는 텍스트 상자에 표시하는 JMP 스크립트 수식안녕하세요, 일부 데이터 포인트의 연결된 그래프를 생성하고 추가 선 그래프로 오버레이하는 스크립트가 있습니다. 이제 여러 x 좌표에서 높은 지점과 낮은 지점 사이의 델타를 계산할 수 있어야 합니다. 모든 x 좌표 값을 포함하기 때문에 첫 번째 작업을 수행할 수 있지만 주황색 계산된 선 사이의 x 좌표 값에 대해서만 수행하는 방법과 유일한 초기 곡선에 대해서만 수행하는 방법이 난처합니다. 주황색 선 계산의 왼쪽과 오른쪽 모두 내부. 가능하면 이 값을 그래프에 표시하거나 그래프를 만들 때 표시되는 텍스트 상자에 표시하고 싶었습니다. 델타를 계산하는 데 필요한 4가지 범위를 설명하는 데 도움이 되는 몇 가지 이미지와 현재 스크립트를 포함했습니다. 주황색 선은 스크립트 실행 시 사용자가 입력한 값을 기반으로 하므로 데이터에 따라 변경될 수 있습니다. 도움을 주시면 감사하겠습니다. 감사해요!



framex_value = "";
w = New Window( "Frame size X",// opens a window with a title and this content...
<<RETURN result=""> (76200 - framex_value/2) & :X coordinate < (76200 - framex_value/2) );
//dt << delete rows:
//FieldMat = matrix(Col Max(IntenCD)-(Col Min(IntenCD)));
New Window( " Delta results: ", modal,
Border Box( top( 20 ), bottom( 20 ), Left( 20 ), Right( 20 ), // window dressing
V List Box( // V and H lists nest to organize the display boxes
H List Box( Text Box( "Full plate delta: " ), TextBox( Char( FullMat ) ) ),
//Spacer Box( size( 1, 10 ) ), // a little vertical space
//H List Box( Text Box( "Full field delta: " ), TextBox( Char( FieldMat ) ) ),
//Spacer Box( size( 1, 10 ) ), // a little vertical space
//H List Box( Text Box( "Edge of field delta: " ), TextBox( Char( 0 ) ) ),
))
);
// Determine X Matrix
xMat = matrix(76200 - (framex_value/2)) |/ matrix(76200 - (framex_value/2)) |/
matrix(76200 + (framex_value/2)) |/ matrix(76200 + (framex_value/2));
// The yMat is static
yMat = [1, 0.92, 0.92, 1];
gb = dt << Graph Builder(
Size( 534, 456 ),
Show Control Panel( 0 ),
Variables( X( :X Coordinate ), Y( :Normalized ) ),
Elements( Points( X, Y, Legend( 5 ) ) )
);
Report( gb )[FrameBox( 1 )] << Add Graphics Script(
Pen Color( "orange" );
Pen Size( 2 );
Line( xmat, ymat );
);
report(gb)[AxisBox(2)] << min(.91);
w << closeWindow; // just the dialog, not the report
)
)
)
)
);</RETURN>품질 및 프로세스 엔지니어링Re: .csv 파일의 X 좌표에서 여러 범위의 델타를 계산하고 그래프 또는 텍스트 상자에 표시하는 JMP 스크립트 수식완벽해, 고마워 @txnelson . 이 두 가지 변경 사항이 트릭을 만들었습니다. 지금은 완벽하게 작동하고 있습니다. 이에 대한 모든 도움에 다시 한 번 감사드립니다!
Re: .csv 파일의 X 좌표에서 여러 범위의 델타를 계산하고 그래프 또는 텍스트 상자에 표시하는 JMP 스크립트 수식기본적으로 JMP가 xMat 등과 같은 변수를 만들 때 변수는 변경될 때까지 유지됩니다.그리고 코드를 처음 실행할 때 필요한 변수가 생성되지 않은 경우 코드에서 변수를 요청할 때 프로그램을 제공할 값이 없으므로 일부 계산은 수행할 수 없습니다. 실행됩니다.그러나 나중에 스크립트에서 변수가 설정되면 삭제되거나 변경될 때까지 설정된 상태로 유지됩니다.따라서 스크립트를 두 번째로 실행하고 코드가 스크립트의 첫 번째 실행에서 필요한 변수를 찾을 수 없는 지점에 도달하면 나중에 설정되었기 때문에 이번에는 찾을 것입니다. 스크립트를 마지막으로 실행하는 동안 코드의 시간입니다.
이런 일이 일어날 수 있는 곳을 찾았습니다.데이터 테이블에 대한 활동이 완료된 후 변수 dt를 설정했습니다.첫 번째 실행에서 코드가 작동할 수 있도록 스크립트에서 코드 줄을 더 위로 이동했습니다.또한 "Clear Symbols()"를 스크립트의 첫 줄로 배치했습니다.이렇게 하면 스크립트가 시작될 때 코드의 모든 변수가 지워집니다.이렇게 하면 마지막 실행의 모든 값이 지워졌으므로 이 코드 실행에서 참조된 변수 값이 생성되어야 합니다.코드를 시도하고 작동하는지 확인하십시오.
Clear Symbols();
Names Default To Here( 1 );
ramex_value = "";
w = New Window( "Frame size X", // opens a window with a title and this content...
<<RETURN result=""> (76200 - (framex_value / 2)) & dt:X coordinate < (76200 + (framex_value / 2)),
dt:Normalized,
.
)
) - Col Max( dt:Normalized ) - Col Min( dt:Normalized ) + 1;
Col Min( If( dt:X coordinate > (76200 - (framex_value / 2)) & dt:X coordinate < (76200 + (framex_value / 2)), dt:Normalized, . ) );
// Graph Builer and Delta display
gb = dt << Graph Builder(
Size( 534, 456 ),
Show Control Panel( 0 ),
Variables( X( dt:X Coordinate ), Y( dt:Normalized ) ),
Elements( Points( X, Y, Legend( 5 ) ) )
);
Report( gb )[FrameBox( 1 )] << Add Graphics Script(
Pen Color( "orange" );
Pen Size( 2 );
Line( xmat, ymat );
// Add the results to the chart
Text( Boxed, {75000, .94}, "Overall Delta = " || Char( Format( overallDelta, 7, 4 ) ) );
Text( Boxed, {75000, .93}, "Within Frame Delta = " || Char( Format( withinOrangeDelta, 7, 4 ) ) );
);
Report( gb )[AxisBox( 2 )] << Min( .91 );
w << closeWindow;
)
)
)
)
);</RETURN>Re: .csv 파일의 X 좌표에서 여러 범위의 델타를 계산하고 그래프 또는 텍스트 상자에 표시하는 JMP 스크립트 수식따라서 내 스크립트로 추가 테스트를 한 후 완벽하게 작동하는 것 같지만(데이터에서 두 번째로 실행) 처음에는 그렇지 않습니다. 첫 번째 실행 후 델타를 계산하고 표시하지 않지만 두 번째로 스크립트를 실행하면 작동합니다...혼란스럽습니다. 정리된 코드와 첫 번째 실행 결과 없음의 그림... 성공적인 결과 두 번째 실행의 그림을 첨부했습니다. 내 스크립트가 처음에 올바르게 작동하지 않는 이유는 무엇입니까?
framex_value = "";
w = New Window( "Frame size X",// opens a window with a title and this content...
<<RETURN result=""> (76200 - (framex_value / 2)) & :X coordinate < (76200 + (framex_value / 2)),
:Normalized,
.
)
) - Col Max( :Normalized ) - Col Min( :Normalized ) +1;
Col Min(
If( :X coordinate > (76200 - (framex_value / 2)) & :X coordinate < (76200 + (framex_value / 2)),
:Normalized,
.
)
);
// Graph Builer and Delta display
gb = dt << Graph Builder(
Size( 534, 456 ),
Show Control Panel( 0 ),
Variables( X( :X Coordinate ), Y( :Normalized ) ),
Elements( Points( X, Y, Legend( 5 ) ) )
);
Report( gb )[FrameBox( 1 )] << Add Graphics Script(
Pen Color( "orange" );
Pen Size( 2 );
Line( xmat, ymat );
// Add the results to the chart
Text( Boxed, {75000, .94}, "Overall Delta = " || Char( Format( overallDelta, 7, 4 ) ) );
Text( Boxed, {75000, .93}, "Within Frame Delta = " || Char( Format( withinOrangeDelta, 7, 4 ) ) );
);
Report( gb )[AxisBox( 2 )] << Min( .91 );
w << closeWindow;
)
)
)
)
);</RETURN>

Re: .csv 파일의 X 좌표에서 여러 범위의 델타를 계산하고 그래프 또는 텍스트 상자에 표시하는 JMP 스크립트 수식감사해요 @txnelson .나는 이것을 알아낼 수 있었고 완벽하게 작동합니다. 그래프에 텍스트를 표시하려면 xy 좌표 주위에 { }를 넣어야 한다는 것을 알았습니다. 내 스크립트에 대한 모든 지식과 도움에 정말 감사드립니다!
Re: .csv 파일의 X 좌표에서 여러 범위의 델타를 계산하고 그래프 또는 텍스트 상자에 표시하는 JMP 스크립트 수식그 추가 설명이 의미가 있습니다. 귀하의 제안에 대해 작업하겠습니다. 감사합니다.
Re: .csv 파일의 X 좌표에서 여러 범위의 델타를 계산하고 그래프 또는 텍스트 상자에 표시하는 JMP 스크립트 수식
// Is the purpose of the display window below, only to display the values of overallDelta and withinOrangeDelta?
// That is all it is going to do. It does not allow for any data input, just displaying of those values
overallDelta = 22;
withinOrangeDelta = 15;
New Window( " Delta results: ",
modal,
Border Box( top( 20 ), bottom( 20 ), Left( 20 ), Right( 20 ), // window dressing
V List Box( // V and H lists nest to organize the display boxes
H List Box( Text Box( "Full plate delta: " ), Text Box( Char( overallDelta, 7, 4 ) ) ),
Spacer Box( size( 1, 10 ) ), // a little vertical space
H List Box( Text Box( "Full field delta: " ), Text Box( Char( withinOrangeDelta, 7, 4 ) ) ),
Spacer Box( size( 1, 10 ) ), // a little vertical space
H List Box( Text Box( "Edge of field delta: " ), Text Box( Char( 0 ) ) ),
)
)
);
// The leftDelta and rightDelta calculations will be similar to the above withinOrangeDelta, but
// I don't know what the upper and lower boundry values of :Normalized are or what the interior
// boundrys for the calclations are
// The code below will create your X Coordinate by Normalized graph
// If you have generated the xmat and ymat matrices, it will draw your orange line on the chart
// Then at a fixed XY point on the graph, of 500,.92 it will add in the text "Overall Delta = nn.nnnn"
// It is likely, that different data from your sample data will make the positioning of the statistics
// inapproprate if you have a hardwired value of 500,.92 for the display. So you will need to determine
// what those values need to be. You can get the values by determining the minimum values in the data table
// or you can query the displayed graph to get the axis minimums and then set the position from there.
gb = dt << Graph Builder(
Size( 534, 456 ),
Show Control Panel( 0 ),
Variables( X( :X Coordinate ), Y( :Normalized ) ),
Elements( Points( X, Y, Legend( 5 ) ) )
);
Report( gb )[FrameBox( 1 )] << Add Graphics Script(
Pen Color( "orange" );
Pen Size( 2 );
Line( xmat, ymat );
// Add the results to the chart
Text( 500, .92, "Overall Delta = " || Char( Format( overallDelta, 7, 4 ) ) );
Text( 500, .915, "Within Delta = " || Char( Format( withinOrangeDelta, 7, 4 ) ) );
);
Report( gb )[AxisBox( 2 )] << Min( .91 );
// I don't see any window reference called "w"
w << closeWindow; // just the dialog, not the reportRe: .csv 파일의 X 좌표에서 여러 범위의 델타를 계산하고 그래프 또는 텍스트 상자에 표시하는 JMP 스크립트 수식걱정 마세요, 그게 제가 궁금했던 것입니다.
차트에 표시되는 텍스트는 어떻습니까? 나는 이것을 보지 못하고 있다. 값이 있는 그래프 전에 열리는 팝업 창을 만들 수 있지만 해당 값을 그래프와 함께 볼 수 있도록 차트에 표시하는 아이디어가 정말 마음에 들었습니다. 내가 거기에 빠진 것이 있습니까?
참고용으로 스크립트 끝 부분만 포함했습니다.
이것에 대한 모든 도움에 다시 한 번 감사드립니다!
New Window( " Delta results: ", modal,
Border Box( top( 20 ), bottom( 20 ), Left( 20 ), Right( 20 ), // window dressing
V List Box( // V and H lists nest to organize the display boxes
H List Box( Text Box( "Full plate delta: " ), TextBox( Char( overallDelta, 7,4 ) ) ),
Spacer Box( size( 1, 10 ) ), // a little vertical space
H List Box( Text Box( "Full field delta: " ), TextBox( Char( withinOrangeDelta, 7,4 ) ) ),
Spacer Box( size( 1, 10 ) ), // a little vertical space
H List Box( Text Box( "Edge of field delta: " ), TextBox( Char( 0 ) ) ),
))
);
// The leftDelta and rightDelta calculations will be similar to the above withinOrangeDelta, but
// I don't know what the upper and lower boundry values of :Normalized are or what the interior
// boundrys for the calclations are
gb = dt << Graph Builder(
Size( 534, 456 ),
Show Control Panel( 0 ),
Variables( X( :X Coordinate ), Y( :Normalized ) ),
Elements( Points( X, Y, Legend( 5 ) ) )
);
Report( gb )[FrameBox( 1 )] << Add Graphics Script(
Pen Color( "orange" );
Pen Size( 2 );
Line( xmat, ymat );
// Add the results to the chart
text ( 500,.92, "Overall Delta = " || char(format(overallDelta, 7,4)));
text ( 500,.915, "Within Delta = " || char(format(withinOrangeDelta, 7,4)));
);
report(gb)[AxisBox(2)] << min(.91);
w << closeWindow; // just the dialog, not the report
)
)
)
)
);Re: .csv 파일의 X 좌표에서 여러 범위의 델타를 계산하고 그래프 또는 텍스트 상자에 표시하는 JMP 스크립트 수식네.......제 오타인거 같네요.....죄송합니다Re: .csv 파일의 X 좌표에서 여러 범위의 델타를 계산하고 그래프 또는 텍스트 상자에 표시하는 JMP 스크립트 수식따라서 :Normalize라고 말하는 코드의 인스턴스는 실제로 :Normalize되어야 합니까?

Re: .csv 파일의 X 좌표에서 여러 범위의 델타를 계산하고 그래프 또는 텍스트 상자에 표시하는 JMP 스크립트 수식사용자가 제공한 데이터 테이블에서 정규화된 열이 생성됩니다.표시하는 그래프를 만드는 데 사용한 데이터는 무엇입니까? "정규화" 열은 해당 그래프의 축 값 중 하나로 사용됩니다.
Re: .csv 파일의 X 좌표에서 여러 범위의 델타를 계산하고 그래프 또는 텍스트 상자에 표시하는 JMP 스크립트 수식이것에 대한 도움을 주셔서 감사합니다. 그래도 여전히 몇 가지 문제가 있습니다. 스크립트를 실행할 때 다음 오류가 발생합니다.
이름 미해결: Normalize{16} 액세스 또는 'Normalize' 평가 , :Normalize/*###*/
또한 문제가 있는 이 섹션을 주석 처리하면 디스플레이 주석을 테스트하기 위해 그래프에 표시되지 않습니다.
이러한 문제를 이해하는 데 도움을 주시겠습니까?
감사해요.
Re: .csv 파일의 X 좌표에서 여러 범위의 델타를 계산하고 그래프 또는 텍스트 상자에 표시하는 JMP 스크립트 수식굉장합니다. 감사합니다. 멋지네요. 나는 그것을 시도하고 그것이 어떻게 작동하는지 볼 것입니다. 도움을 주셔서 정말 감사합니다.
Re: .csv 파일의 X 좌표에서 여러 범위의 델타를 계산하고 그래프 또는 텍스트 상자에 표시하는 JMP 스크립트 수식차트(테스트되지 않은 코드)에 일부 코드를 추가하여 전체 및 델타 내에서 계산합니다.왼쪽 및 오른쪽 델타 계산에는 상자를 정의하는 규칙이 필요합니다.
또한 2개의 값에 대한 매우 간단한 표시를 추가했습니다.
두 경우 모두 코드에 대한 다음 개선 사항을 제공하기 위해 취해야 할 접근 방식을 제공하고 있습니다.완벽한 코드를 보장할 수는 없지만 개념을 보고 거기에서 가져갈 수 있어야 합니다.
framex_value = "";
w = New Window( "Frame size X",// opens a window with a title and this content...
<<RETURN result=""> (76200 - framex_value/2) & :X coordinate < (76200 - framex_value/2) );
//dt << delete rows:
//FieldMat = matrix(Col Max(IntenCD)-(Col Min(IntenCD)));
New Window( " Delta results: ", modal,
Border Box( top( 20 ), bottom( 20 ), Left( 20 ), Right( 20 ), // window dressing
V List Box( // V and H lists nest to organize the display boxes
H List Box( Text Box( "Full plate delta: " ), TextBox( Char( FullMat ) ) ),
//Spacer Box( size( 1, 10 ) ), // a little vertical space
//H List Box( Text Box( "Full field delta: " ), TextBox( Char( FieldMat ) ) ),
//Spacer Box( size( 1, 10 ) ), // a little vertical space
//H List Box( Text Box( "Edge of field delta: " ), TextBox( Char( 0 ) ) ),
))
);
// Determine X Matrix
xMat = matrix(76200 - (framex_value/2)) |/ matrix(76200 - (framex_value/2)) |/
matrix(76200 + (framex_value/2)) |/ matrix(76200 + (framex_value/2));
// The yMat is static
yMat = [1, 0.92, 0.92, 1];
// The overall delta
overallDelta = Col Max( :Normalized ) - Col Min( :Normalized );
// The delta between the lines
withinOrangeDelta = Col Max(
If( :X coordinate > (76200 - (framex_value / 2)) & :X coordinate < (76200 + (framex_value / 2)),
:Normalize,
.
)
) - Col Max( :Normalized ) - Col Min( :Normalized );
withinOrangeDelta = Col Min(
If( :X coordinate > (76200 - (framex_value / 2)) & :X coordinate < (76200 + (framex_value / 2)),
:Normalize,
.
)
);
// The leftDelta and rightDelta calculations will be similar to the above withinOrangeDelta, but
// I don't know what the upper and lower boundry values of :Normalized are or what the interior
// boundrys for the calclations are
gb = dt << Graph Builder(
Size( 534, 456 ),
Show Control Panel( 0 ),
Variables( X( :X Coordinate ), Y( :Normalized ) ),
Elements( Points( X, Y, Legend( 5 ) ) )
);
Report( gb )[FrameBox( 1 )] << Add Graphics Script(
Pen Color( "orange" );
Pen Size( 2 );
Line( xmat, ymat );
// Add the results to the chart
text ( 500,.92, "Overall Delta = " || char(format(overallDelta, 7,4)));
text ( 500,.915, "Within Delta = " || char(format(withinOrangeDelta, 7,4)));
);
report(gb)[AxisBox(2)] << min(.91);
w << closeWindow; // just the dialog, not the report
)
)
)
)
);</RETURN>