cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
%3CLINGO-SUB%20id%3D%22lingo-sub-240433%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%EC%84%B8%EB%A1%9C%20%EC%A0%95%EA%B7%9C%20%EB%B6%84%ED%8F%AC%20%EB%8B%A4%EA%B0%81%ED%98%95%20%EB%AA%A8%EC%96%91(%EA%B7%B8%EB%9E%98%ED%94%BD%20%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8C%85)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-240433%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CDIV%20class%3D%22lia-message-template-problem-zone%22%3E%EB%AC%B8%EC%A0%9C%3CP%3E%EB%82%98%EB%8A%94%20%EA%B0%84%ED%96%89%EB%AC%BC%EC%9D%84%20%EC%9C%84%ED%95%B4%20%EC%9D%B4%20%EA%B7%B8%EB%A6%BC%EC%9D%84%20%EB%A7%8C%EB%93%A4%EA%B3%A0%20%EC%8B%B6%EC%97%88%EB%8B%A4%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Picture1.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Picture1.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Picture1.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F20874iD2B331866F86C182%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Picture1.png%22%20alt%3D%22Picture1.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FDIV%3E%3CDIV%20class%3D%22lia-message-template-diagnosis-zone%22%3E%ED%95%B4%EA%B2%B0%EC%B1%85%3CP%3E%EC%88%98%EC%A7%81%20%EB%B0%A9%ED%96%A5%EC%9D%98%20%EC%9D%8C%EC%98%81%2F%EC%B1%84%EC%9B%80%20%EB%B0%8F%20%EC%9E%98%EB%A6%B0%20%EB%B2%95%EC%84%A0%20%EA%B3%A1%EC%84%A0%EC%9D%84%20%EB%A7%8C%EB%93%A4%EA%B8%B0%20%EC%9C%84%ED%95%B4%20Polygon()%20%EA%B7%B8%EB%9E%98%ED%94%BD%20%EA%B8%B0%EB%8A%A5%EC%9D%84%20%EC%82%AC%EC%9A%A9%ED%96%88%EC%8A%B5%EB%8B%88%EB%8B%A4.%EB%AC%B8%EC%A0%9C%EB%8A%94%20%ED%81%AC%EA%B8%B0%EA%B0%80%20%EC%A1%B0%EC%A0%95%EB%90%98%EA%B3%A0%20%EA%B7%B8%EB%9E%98%ED%94%84%EC%97%90%20%EC%A0%81%EC%A0%88%ED%95%98%EA%B2%8C%20%EB%B0%B0%EC%B9%98%EB%90%9C%20%EB%8B%A4%EA%B0%81%ED%98%95%EC%9D%84%20%EC%89%BD%EA%B3%A0%20%EB%B0%98%EB%B3%B5%EC%A0%81%EC%9C%BC%EB%A1%9C%20%EB%A7%8C%EB%93%A4%20%EC%88%98%20%EC%9E%88%EB%8A%94%20%EA%B2%83%EC%9D%B4%EC%97%88%EC%8A%B5%EB%8B%88%EB%8B%A4.%EC%9D%B4%20%EA%B8%B0%EB%8A%A5%EC%9D%84%20%EC%82%AC%EC%9A%A9%ED%95%98%EC%97%AC%EC%9D%B4%20%EC%9E%91%EC%97%85%EC%9D%84%20%EC%88%98%ED%96%89%ED%96%88%EC%8A%B5%EB%8B%88%EB%8B%A4.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Efunc_VNormalShape%20%3D%20Function(%20%2F%2F%20create%20a%20polygon%20that%20looks%20like%20a%20vertically%20oriented%20normal%20distribution%0A%20%7B_xloc%2C%20_yloc%2C%20_xscale%20%3D%201%2C%20_yscale%20%3D%201%7D%2C%0A%20%7B_VNormShapeX%2C%20_VNormShapeY%7D%2C%20%0A%20%20%0A%20%20%2F%2F%20create%20a%20vector%20of%20y%20values%20to%20use%20for%20plotting%20the%20shape%0A%20_VNormShapeY%20%3D%20((_yloc%20-%203%20*%20_yscale)%20%3A%3A%20(_yloc%20%2B%203%20*%20_yscale)%20%3A%3A%20(_yscale%20%2F%2010))%60%3B%0A%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%2F%2F%20create%20the%20filled%20polygon%20boundary%20points%0A%20_VNormShapeX%20%3D%20V%20Concat(%0A%20%20J(%2061%2C%201%2C%20_xloc%20)%2C%0A%20%20_xloc%20%2B%20Sqrt(%202%20*%20Pi()%20)%20*%20_yscale%20*%20_xscale%20*%20Normal%20Density(%0A%20%20%20Sort%20Descending(%20_VNormShapeY%20)%2C%0A%20%20%20_yloc%2C%0A%20%20%20_yscale%0A%20%20)%0A%0A%20)%3B%0A%20_VNormShapeY%20%3D%20V%20Concat(%0A%20%20_VNormShapeY%2C%0A%20%20Sort%20Descending(%20_VNormShapeY%20)%0A%0A%20)%3B%0A%20%20%0A%20%20%2F%2F%20substitute%20into%20the%20Polygon(function)%20the%20two%20vectors%20with%20the%20boundary%20point%20X%20and%20Y%20values%0A%20%2F%2F%20and%20evaluate%20the%20function%0A%20Eval(%0A%20%20Substitute(%0A%20%20%20%20Expr(%0A%20%20%20%20%20Polygon(%20Expr(%20shape_x%20)%2C%20Expr(%20shape_y%20)%20)%0A%20%20%20%20)%2C%0A%20%20%20Expr(%20shape_x%20)%2C%20_VNormShapeX%2C%0A%20%20%20Expr(%20shape_y%20)%2C%20_VNormShapeY%0A%20%20)%0A%20)%3B%0A)%3B%20%3C%2FCODE%3E%3C%2FPRE%3E%ED%95%A8%EC%88%98%EC%9D%98%20%EC%B2%98%EC%9D%8C%20%EB%91%90%20%EC%9D%B8%EC%88%98%EB%8A%94%20%EA%B7%B8%EB%A6%B4%20%EB%B6%84%ED%8F%AC%EC%9D%98%20%22%EC%9B%90%EC%A0%90%22%20%EB%98%90%EB%8A%94%20%EC%9C%84%EC%B9%98%EB%A5%BC%20%EC%A7%80%EC%A0%95%ED%95%A9%EB%8B%88%EB%8B%A4(%EC%A6%89%2C%20%EB%B6%84%ED%8F%AC%EC%9D%98%20%EC%A4%91%EC%8B%AC%20%EA%B8%B0%EC%A4%80%EC%97%90%20%EB%8C%80%ED%95%9C%20(x%2Cy)%20%EC%9C%84%EC%B9%98).%EB%91%90%20%EB%B2%88%EC%A7%B8%20%EC%84%A0%ED%83%9D%EC%A0%81%20%EC%9D%B8%EC%88%98%EB%8A%94%20%EB%B6%84%ED%8F%AC%20%ED%81%AC%EA%B8%B0%EC%9D%98%20%EC%8A%A4%EC%BC%80%EC%9D%BC%EB%A7%81%EC%9E%85%EB%8B%88%EB%8B%A4.%EA%B8%B0%EB%B3%B8%20%ED%81%AC%EA%B8%B0%EB%8A%94%20%ED%91%9C%EC%A4%80%20%EC%A0%95%EA%B7%9C%20%EB%B6%84%ED%8F%AC%EB%A5%BC%20%EA%B8%B0%EB%B0%98%EC%9C%BC%EB%A1%9C%20%ED%95%98%EB%A9%B0%20%EB%B0%B0%EC%9C%A8%EC%9D%80%20x%20%EB%B0%A9%ED%96%A5%EA%B3%BC%20y%20%EB%B0%A9%ED%96%A5%EC%97%90%20%EC%83%81%EB%8C%80%EC%A0%81%EC%9E%85%EB%8B%88%EB%8B%A4.%26nbsp%3B%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22lia-message-template-diagnosis-zone%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22lia-message-template-diagnosis-zone%22%3E%ED%95%A8%EC%88%98%EC%9D%98%20%EA%B2%B0%EA%B3%BC%EB%8A%94%20%EA%B7%B8%EB%9E%98%ED%94%BD%20%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8%EA%B0%80%20%EB%B6%84%ED%8F%AC%EB%A5%BC%20%EB%8B%A4%EA%B0%81%ED%98%95%EC%9C%BC%EB%A1%9C%20%EA%B7%B8%EB%A6%AC%EB%8A%94%20%EB%8D%B0%20%EC%82%AC%EC%9A%A9%ED%95%9C%20%ED%8F%89%EA%B0%80%EB%90%9C%20%ED%91%9C%ED%98%84%EC%8B%9D%EC%9E%85%EB%8B%88%EB%8B%A4.%3C%2FDIV%3E%3CDIV%20class%3D%22lia-message-template-diagnosis-zone%22%3E%EC%98%88%3A%3C%2FDIV%3E%3CDIV%20class%3D%22lia-message-template-diagnosis-zone%22%3Efunc_VNormalShape(1%2C3)%EC%9D%80%20x%3D1%2C%20y%3D3%EC%97%90%20%EC%A4%91%EC%8B%AC%EC%9D%84%20%EB%91%94%20%EC%84%B8%EB%A1%9C%20%EB%B0%A9%ED%96%A5%20%ED%91%9C%EC%A4%80%20%EC%A0%95%EA%B7%9C%20%EB%B6%84%ED%8F%AC%EC%97%90%20%EB%8C%80%ED%95%9C%20%EB%8B%A4%EA%B0%81%ED%98%95%20%EB%AC%B8%EC%9D%84%20%EB%A7%8C%EB%93%AD%EB%8B%88%EB%8B%A4.%3C%2FDIV%3E%3CDIV%20class%3D%22lia-message-template-diagnosis-zone%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22lia-message-template-diagnosis-zone%22%3Efunc_VNormalShape(2%2C4%2C%200.5%2C%201.5)%EB%8A%94%20x%3D2%2C%20y%3D5%EB%A5%BC%20%EC%A4%91%EC%8B%AC%EC%9C%BC%EB%A1%9C%20%EB%B6%84%ED%8F%AC%EB%A5%BC%20%EC%83%9D%EC%84%B1%ED%95%98%EC%A7%80%EB%A7%8C%20%EA%B0%80%EB%A1%9C%20%EB%84%88%EB%B9%84%EB%8A%94%200.5%EB%B0%B0%20%EC%B6%95%EC%86%8C%EB%90%98%EA%B3%A0%20%EC%84%B8%EB%A1%9C%20%EB%84%88%EB%B9%84%EB%8A%94%201.5%EB%B0%B0%20%ED%99%95%EB%8C%80%EB%90%A9%EB%8B%88%EB%8B%A4.%3C%2FDIV%3E%3CDIV%20class%3D%22lia-message-template-solution-zone%22%3E%EB%85%BC%EC%9D%98%3CP%3E%EB%8B%A4%EC%9D%8C%EC%9D%80%20%EC%A0%84%EC%B2%B4%20%EA%B7%B8%EB%9E%98%ED%94%BD%EC%9D%98%20%EC%9D%BC%EB%B6%80%EB%A5%BC%20%EB%A7%8C%EB%93%9C%EB%8A%94%20%EC%A0%84%EC%B2%B4%20%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8%EC%9E%85%EB%8B%88%EB%8B%A4.%EC%9D%B4%20%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8%EC%9D%98%20%EC%B6%9C%EB%A0%A5%EC%9D%84%20%EC%9D%B4%EB%AF%B8%EC%A7%80%20%ED%8C%8C%EC%9D%BC%EB%A1%9C%20%EC%A0%80%EC%9E%A5%ED%95%9C%20%EB%8B%A4%EC%9D%8C%20%ED%8C%8C%EC%9B%8C%ED%8F%AC%EC%9D%B8%ED%8A%B8%EB%A1%9C%20%EA%B0%80%EC%A0%B8%EC%99%80%20%EC%9D%BC%EB%B6%80%20%EC%A3%BC%EC%84%9D%EC%9D%84%20%EC%B6%94%EA%B0%80%ED%95%98%EA%B3%A0%20%EA%B2%8C%EC%8B%9C%EB%AC%BC%20%EC%83%81%EB%8B%A8%EC%97%90%20%ED%91%9C%EC%8B%9C%EB%90%9C%20%EA%B7%B8%EB%9E%98%ED%94%BD%EC%97%90%20%EB%8F%84%EB%8B%AC%ED%96%88%EC%8A%B5%EB%8B%88%EB%8B%A4.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Enames%20default%20to%20here(1)%3B%0A%0Afunc_VNormalShape%20%3D%20Function(%20%2F%2F%20create%20a%20polygon%20that%20looks%20like%20a%20vertically%20oriented%20normal%20distribution%0A%20%7B_xloc%2C%20_yloc%2C%20_xscale%20%3D%201%2C%20_yscale%20%3D%201%7D%2C%0A%20%7B_VNormShapeX%2C%20_VNormShapeY%7D%2C%20%0A%20%20%0A%20%20%2F%2F%20create%20a%20vector%20of%20y%20values%20to%20use%20for%20plotting%20the%20shape%0A%20_VNormShapeY%20%3D%20((_yloc%20-%203%20*%20_yscale)%20%3A%3A%20(_yloc%20%2B%203%20*%20_yscale)%20%3A%3A%20(_yscale%20%2F%2010))%60%3B%0A%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%2F%2F%20create%20the%20filled%20polygon%20boundary%20points%0A%20_VNormShapeX%20%3D%20V%20Concat(%0A%20%20J(%2061%2C%201%2C%20_xloc%20)%2C%0A%20%20_xloc%20%2B%20Sqrt(%202%20*%20Pi()%20)%20*%20_yscale%20*%20_xscale%20*%20Normal%20Density(%0A%20%20%20Sort%20Descending(%20_VNormShapeY%20)%2C%0A%20%20%20_yloc%2C%0A%20%20%20_yscale%0A%20%20)%0A%0A%20)%3B%0A%20_VNormShapeY%20%3D%20V%20Concat(%0A%20%20_VNormShapeY%2C%0A%20%20Sort%20Descending(%20_VNormShapeY%20)%0A%0A%20)%3B%0A%20%20%0A%20%20%2F%2F%20substitute%20into%20the%20Polygon(function)%20the%20two%20vectors%20with%20the%20boundary%20point%20X%20and%20Y%20values%0A%20%2F%2F%20and%20evaluate%20the%20function%0A%20Eval(%0A%20%20Substitute(%0A%20%20%20%20Expr(%0A%20%20%20%20%20Polygon(%20Expr(%20shape_x%20)%2C%20Expr(%20shape_y%20)%20)%0A%20%20%20%20)%2C%0A%20%20%20Expr(%20shape_x%20)%2C%20_VNormShapeX%2C%0A%20%20%20Expr(%20shape_y%20)%2C%20_VNormShapeY%0A%20%20)%0A%20)%3B%0A)%3B%20%0A%0A_nw%3Dnew%20window(%22Figure%22%2C%0A%20_ob%3DOutline%20Box(%22Figure%22%2C%0A%20%20_gb%3DGraph%20Box(%0A%20%20%20suppressaxes%2C%0A%20%20%20x%20scale(0%2C5)%2C%0A%20%20%20y%20scale(-1%2C11)%2C%0A%20%20%20Xname(%22%22)%2C%0A%20%20%20Yname(%22%22)%2C%0A%20%20%20fill%20color(%22gray%22)%3B%0A%20%20%20func_VNormalShape(1%2C%208%2C%20.75%2C%20.75)%3B%0A%20%20%20line(%7B1%2C8%7D%2C%20%7B1.75%2C%208%7D)%3B%0A%20%20%20func_VNormalShape(2%2C%206%2C%20.75%2C%20.75)%3B%0A%20%20%20line(%7B2%2C6%7D%2C%20%7B2.75%2C%206%7D)%3B%0A%20%20%20func_VNormalShape(3%2C%204%2C%20.75%2C%20.75)%3B%0A%20%20%20line(%7B3%2C4%7D%2C%20%7B3.75%2C%204%7D)%3B%0A%20%20%20func_VNormalShape(4%2C%202%2C%20.75%2C%20.75)%3B%0A%20%20%20line(%7B4%2C2%7D%2C%20%7B4.75%2C%202%7D)%3B%0A%20%20%20linestyle(1)%3B%0A%20%20%20Pen%20Size(2)%3B%0A%20%20%20line(%7B0.5%2C%205%7D%2C%20%7B4.5%2C%205%7D)%3B%0A%20%20%20%0A%20%20)%0A%20%20%0A%20)%0A)%3B%0A%0A_gb%5BFrameBox(1)%5D%26lt%3B%26lt%3B%7Btop(0)%2C%20bottom(0)%2C%20left(0)%2C%20right(0)%7D%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%EA%B2%B0%EA%B3%BC%20%EC%B6%9C%EB%A0%A5%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%221-7-2020%2011-06-14%20PM.png%22%20style%3D%22width%3A%20462px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%221-7-2020%2011-06-14%20PM.png%22%20style%3D%22width%3A%20462px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%221-7-2020%2011-06-14%20PM.png%22%20style%3D%22width%3A%20462px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F20875i03850EAC6C6DBAD5%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%221-7-2020%2011-06-14%20PM.png%22%20alt%3D%221-7-2020%2011-06-14%20PM.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%EB%98%90%ED%95%9C%EB%B3%B4%EC%8B%AD%EC%8B%9C%EC%98%A4%3C%2FDIV%3E%3CDIV%20class%3D%22lia-message-template-solution-zone%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22lia-message-template-solution-zone%22%3E%EC%9D%B4%20%EB%8D%B0%EB%AA%A8%2F%ED%8B%B0%EC%B9%AD%20%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8%EC%97%90%EC%84%9C%EB%8F%84%20%EC%9D%B4%20%EA%B8%B0%EB%8A%A5%EC%9D%84%20%EC%82%AC%EC%9A%A9%ED%96%88%EC%8A%B5%EB%8B%88%EB%8B%A4.%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2FJMP-Scripts%2FAnimated-Sampling-Distribution%2Fta-p%2F79456%22%20target%3D%22_blank%22%3E%20https%3A%2F%2Fcommunity.jmp.com%2Ft5%2FJMP-Scripts%2FAnimated-Sampling-Distribution%2Fta-p%2F79456%3C%2FA%3E%3C%2FDIV%3E%3CDIV%20class%3D%22lia-message-template-solution-zone%22%3E%EC%98%A4%EB%8A%98%EC%9D%80%20%EC%A0%9C%20%EB%AA%A8%EC%8A%B5%EC%9D%84%20%EB%A7%8C%EB%93%A4%EB%A0%A4%EA%B3%A0%20%EB%B9%BC%EB%83%88%EC%9D%84%20%EB%95%8C%20%EC%A0%95%EB%A7%90%20%ED%8E%B8%EB%A6%AC%ED%95%B4%EC%84%9C%20%EB%94%B0%EB%A1%9C%20%EB%98%90%20%EA%B3%B5%EC%9C%A0%ED%95%98%EA%B3%A0%20%EC%8B%B6%EC%97%88%EC%8A%B5%EB%8B%88%EB%8B%A4.%26nbsp%3B%26nbsp%3B%3C%2FDIV%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
Vertical Normal Distribution Polygon Shape (Graphics Scripting)
Problem

I wanted to create this figure for a publication

 

Picture1.png

Solution

To create the vertically oriented shaded/filled and truncated normal curves, I utilized the Polygon() graphics function.  The challenge was to easily and repeated be able to create that polygon that was scaled and located appropriately on a graph.    I did this using this function

 

func_VNormalShape = Function( // create a polygon that looks like a vertically oriented normal distribution
	{_xloc, _yloc, _xscale = 1, _yscale = 1},
	{_VNormShapeX, _VNormShapeY}, 
		
		// create a vector of y values to use for plotting the shape
	_VNormShapeY = ((_yloc - 3 * _yscale) :: (_yloc + 3 * _yscale) :: (_yscale / 10))`;

        
        // create the filled polygon boundary points
	_VNormShapeX = V Concat(
		J( 61, 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 vectors 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
		)
	);
); 
the first two arguments of the function specify the "origin" or location of the distribution to be drawn (i.e. the (x,y) position for the center base of the distribution).  The second two optional arguments are the scaling of the size of the distributions.  The default size is based on a standard normal distribution, and the scaling is relative the x direction and y direction.  
 
The result of the function is an evaluated expression that a graphics script used to draw the distribution as a polygon.
examples:
func_VNormalShape(1,3)  creates the polygon statement for a vertically oriented standard normal distribution centered at x=1, y=3.
 
func_VNormalShape(2,4, 0.5, 1.5) creates the distribution centered at x=2, y=5, but the horizontal width is scaled down by a factor of 0.5 and the vertical width is scaled up by a factor of 1.5.
Discussion

Here is the full script that creates part of the of overall graphic.  I saved the output from this script as an image file and then imported into powerpoint to add some annotations and arrived at the graphic shown at the top of the post

 

names default to here(1);

func_VNormalShape = Function( // create a polygon that looks like a vertically oriented normal distribution
	{_xloc, _yloc, _xscale = 1, _yscale = 1},
	{_VNormShapeX, _VNormShapeY}, 
		
		// create a vector of y values to use for plotting the shape
	_VNormShapeY = ((_yloc - 3 * _yscale) :: (_yloc + 3 * _yscale) :: (_yscale / 10))`;

        
        // create the filled polygon boundary points
	_VNormShapeX = V Concat(
		J( 61, 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 vectors 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
		)
	);
); 

_nw=new window("Figure",
	_ob=Outline Box("Figure",
		_gb=Graph Box(
			suppressaxes,
			x scale(0,5),
			y scale(-1,11),
			Xname(""),
			Yname(""),
			fill color("gray");
			func_VNormalShape(1, 8, .75, .75);
			line({1,8}, {1.75, 8});
			func_VNormalShape(2, 6, .75, .75);
			line({2,6}, {2.75, 6});
			func_VNormalShape(3, 4, .75, .75);
			line({3,4}, {3.75, 4});
			func_VNormalShape(4, 2, .75, .75);
			line({4,2}, {4.75, 2});
			linestyle(1);
			Pen Size(2);
			line({0.5, 5}, {4.5, 5});
			
		)
		
	)
);

_gb[FrameBox(1)]<<{top(0), bottom(0), left(0), right(0)};

resulting output:

1-7-2020 11-06-14 PM.png


See Also
 
I had also used this function in this demonstration / teaching script https://community.jmp.com/t5/JMP-Scripts/Animated-Sampling-Distribution/ta-p/79456
I wanted to share it again by itself, as it was really handy today when I pulled it out to make my figure.  
JSL Cookbook

If you’re looking for a code snippet or design pattern that performs a common task for your JSL project, the JSL Cookbook is for you.

This knowledge base contains building blocks of JSL code that you can use to reduce the amount of coding you have to do yourself.

It's also a great place to learn from the experts how to use JSL in new ways, with best practices.