프레젠테이션, 교육 및 출판에 사용할 정규 분포 곡선을 채워야하는 경우가 여러 차례있었습니다. 정규 분포만큼이나 일반적이고 중요한 것처럼, 이것을 표준 모양이나 인터넷 검색을 사용하여 쉽게 찾을 수 있다고 생각하지만 필요한 것을 찾는 데 많은 운이 없었습니다.
JMP에는 그래픽 스크립트를 사용하여 플롯에 선과 기하학적 모양을 그리는 좋은 방법이 있습니다. 이런 모양을 원한다면

한 가지 방법은 정규 분포 함수를 사용하여 다각형을 정의하는 좌표 점으로 벡터를 만든 다음 그래픽 스크립트에서이를 Polygon () 함수의 인수로 사용하는 것입니다.
아래에 표시된 함수는이를 수행하고 그래픽 스크립트에서 사용할 수있는 평가 된 표현식을 리턴합니다.
func_VNormalShape = Function( // create a polygon that looks like a vertically oriented normal distribution
{_xloc, _yloc, _xscale = 1, _yscale = 1, _range=3, _scaleres=10},
{_VNormShapeX, _VNormShapeY},
// _xloc, _yloc is the "origin" for the normal curve (centered on Yloc, base of curve at xloc)
// _xscale is the scale magnification in the x-axis direction
// _yscale is the scale magnification in the y-axis direction
// range is the +/- range (in standard deviation) to draws the curve over
// scalres is the number of points per _yscale to use for determining the polygon. 10 generally works well, but if range is set to be large
// then scale_res should probably be increased.
// create a vector of y values to use for plotting the shape
_VNormShapeY = ((_yloc - _range * _yscale) :: (_yloc + _range * _yscale) :: (_yscale / _scaleres))`;
// create the filled polygon boundary points
_VNormShapeX = V Concat(
J( _range*2*_scaleres + 1, 1, _xloc ),
_xloc + Sqrt( 2 * Pi() ) * _yscale * _xscale * Normal Density( Sort Descending( _VNormShapeY ), _yloc, _yscale )
);
_VNormShapeY = V Concat(
_VNormShapeY,
Sort Descending( _VNormShapeY )
);
// substitute into the Polygon(function) the two vectorw with the boundary point X and Y values
// and evaluate the function
Eval( Substitute( Expr( Polygon( Expr( shape_x ), Expr( shape_y ) ) ), Expr( shape_x ), _VNormShapeX, Expr( shape_y ), _VNormShapeY ) );
); 그런 다음 해당 함수를 아래 그림과 같이 Graph Box () 함수 내에서 사용할 수 있습니다 (위에 채워진 법선 곡선이 생성됨).
_nw = New Window( "Vertical Normal Distribution",
_ob = Outline Box("Gray Vertical Filled Normal Distribution",
_hlb = H List Box(
_gb = Graph Box(
X Scale( 0, 1.1 ),
Y Scale( 1, 8 ),
Xname( "" ),
Yname( "" ),
Fill Color( "gray" );
func_VNormalShape( 0, 4.5, 1, 1, 3.4, 8 );
)
)
)
);
다른 확률 분포에도 동일한 접근 방식이 적용될 수 있습니다.