cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-39364%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%A6%82%E4%BD%95%E6%9B%B4%E6%94%B9CDF%E6%88%96%E5%88%86%E4%BD%8D%E6%95%B0%E5%9B%BE%E4%B8%AD%E7%9A%84%E7%BA%BF%E6%9D%A1%E9%A2%9C%E8%89%B2%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-39364%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E5%97%A8%EF%BC%8C%3C%2FP%3E%3CP%3E%E6%88%91%E6%AD%A3%E5%9C%A8%E7%94%9F%E6%88%90%E5%83%8F%E4%B8%8B%E9%9D%A2%E7%9A%84%E4%BE%8B%E5%AD%90%E9%82%A3%E6%A0%B7%E7%9A%84%E7%B4%AF%E7%A7%AF%E5%9B%BE%E3%80%82%3C%2FP%3E%3CP%3E%E4%BD%86%E6%98%AF%EF%BC%8C%E6%88%91%E6%83%B3%E8%A6%81%E7%9A%84%E9%A2%9C%E8%89%B2%E4%B8%8D%E6%98%AF%E7%94%B1col2%E7%A1%AE%E5%AE%9A%EF%BC%8C%E8%80%8C%E6%98%AF%E7%94%B1col3%E7%A1%AE%E5%AE%9A%E3%80%82%3C%2FP%3E%3CP%3E%E6%B7%BB%E5%8A%A0%3CSPAN%3E%E9%A2%9C%E8%89%B2%EF%BC%88%EF%BC%9Acol3%EF%BC%89%E6%B2%A1%E6%9C%89%E5%81%9A%E5%88%B0%E8%BF%99%E4%B8%80%E7%82%B9......%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%E8%B0%A2%E8%B0%A2%EF%BC%8C%E8%8F%B2%E5%B0%94%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E5%8D%95%E7%A8%8B%EF%BC%88%20%3CBR%20%2F%3E%20Y%EF%BC%88%EF%BC%9Acol1%EF%BC%89%EF%BC%8CX%EF%BC%88%EF%BC%9Acol2%EF%BC%89%EF%BC%8C%3CBR%20%2F%3E%E6%89%80%E6%9C%89%E5%9B%BE%E5%BD%A2%EF%BC%880%EF%BC%89%EF%BC%8C%E6%8C%89%E5%AE%9E%E9%99%85%EF%BC%881%EF%BC%89%E7%BB%98%E5%88%B6%E5%88%86%E4%BD%8D%E6%95%B0%EF%BC%8C%E6%8B%9F%E5%90%88%E7%BA%BF%EF%BC%880%EF%BC%89%EF%BC%8CX%E8%BD%B4%E6%AF%94%E4%BE%8B%EF%BC%880%EF%BC%89%EF%BC%8C%E5%A4%A7%E5%B9%B3%E5%9D%87%E5%80%BC%EF%BC%880%EF%BC%89%EF%BC%8C%E9%A2%9C%E8%89%B2%EF%BC%88%EF%BC%9Acol3%EF%BC%89%20%3CBR%20%2F%3E%20%EF%BC%89%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-39424%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%EF%BC%9A%E5%A6%82%E4%BD%95%E5%9C%A8CDF%E6%88%96%E5%88%86%E4%BD%8D%E6%95%B0%E5%9B%BE%E4%B8%AD%E6%94%B9%E5%8F%98%E7%BA%BF%E6%9D%A1%E9%A2%9C%E8%89%B2%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-39424%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%86%8D%E6%AC%A1%E6%84%9F%E8%B0%A2%E6%82%A8%E7%9A%84%E5%8A%AA%E5%8A%9B%E3%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%A2%E8%B0%A2%EF%BC%8C%E8%8F%B2%E5%88%A9%E6%99%AE%3CBR%20%2F%3E%3CBR%20%2F%3E%20Expr%20%3D%20%3CBR%20%2F%3E%20%E2%80%9C%E5%8D%95%E7%A8%8B%EF%BC%88%20%3CBR%20%2F%3E%20Y%EF%BC%88%EF%BC%9A%E9%87%8D%E9%87%8F%EF%BC%89%EF%BC%8C%3CBR%20%2F%3E%20X%EF%BC%88%EF%BC%9ASex_Class%EF%BC%89%EF%BC%8C%3CBR%20%2F%3E%E6%89%80%E6%9C%89%E5%9B%BE%E8%A1%A8%EF%BC%880%EF%BC%89%EF%BC%8C%3CBR%20%2F%3E%E6%8C%89%E5%AE%9E%E9%99%85%E7%BB%98%E5%88%B6%E5%88%86%E4%BD%8D%E6%95%B0%EF%BC%881%EF%BC%89%EF%BC%8C%3CBR%20%2F%3E%E9%80%82%E5%90%88%E7%BA%BF%EF%BC%880%EF%BC%89%EF%BC%8C%3CBR%20%2F%3E%20X%E8%BD%B4%E6%AF%94%E4%BE%8B%EF%BC%880%EF%BC%89%EF%BC%8C%3CBR%20%2F%3E%E4%B8%AD%E5%BA%B8%E4%B9%8B%E9%81%93%EF%BC%880%EF%BC%89%EF%BC%8C%3CBR%20%2F%3E%20SendToReport%EF%BC%88%20%3CBR%20%2F%3E%E8%B0%83%E5%BA%A6%EF%BC%88%7B%7D%20%5C%EF%BC%81%E2%80%9C400%20%5C%EF%BC%81%E2%80%9D%EF%BC%8C%3CBR%20%2F%3E%20ScaleBox%EF%BC%8C%3CBR%20%2F%3E%20%7B%E4%BC%A0%E5%A5%87%E6%A8%A1%E5%9E%8B%EF%BC%881%E2%80%9C%3B%20%3CBR%20%2F%3E%E5%AF%B9%E4%BA%8E%EF%BC%88i%20%3D%201%EF%BC%8Ci%20%26lt%3B%3D%20N%E9%A1%B9%EF%BC%88%E7%BB%84%EF%BC%89%EF%BC%8Ci%20%2B%2B%EF%BC%8C%3CBR%20%2F%3E%20Expr%20%3D%20Expr%20%7C%7C%20%E2%80%9C%EF%BC%8C%E5%B1%9E%E6%80%A7%EF%BC%88%E2%80%9D%7C%7C%20Char%EF%BC%88i%EF%BC%89%7C%7C%E2%80%9C%EF%BC%8C%7BLine%20Style%EF%BC%88%5C%EF%BC%81%E2%80%9D%E2%80%9C%7C%7C%20%3CBR%20%2F%3E%20linetype%20%5BMod%EF%BC%88i%EF%BC%8C5%EF%BC%89%2B%201%5D%20%7C%7C%20%E2%80%9C%5C%EF%BC%81%E2%80%9D%20%EF%BC%89%7D%EF%BC%89%E2%80%9C%3B%20%3CBR%20%2F%3E%20%EF%BC%89%3B%20%3CBR%20%2F%3E%20Expr%20%3D%20Expr%20%7C%7C%20%E2%80%9C%EF%BC%89%7D%EF%BC%89%EF%BC%89%EF%BC%89%E2%80%9D%3B%20%3CBR%20%2F%3E%3CBR%20%2F%3E%20Eval%EF%BC%88Parse%EF%BC%88Expr%EF%BC%89%EF%BC%89%3B%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-39400%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%EF%BC%9A%E5%A6%82%E4%BD%95%E5%9C%A8CDF%E6%88%96%E5%88%86%E4%BD%8D%E6%95%B0%E5%9B%BE%E4%B8%AD%E6%94%B9%E5%8F%98%E7%BA%BF%E6%9D%A1%E9%A2%9C%E8%89%B2%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-39400%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E5%B0%9D%E8%AF%95%E8%BF%99%E4%B8%AA%E5%B0%BA%E5%AF%B8%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%5Cbig%20class.jmp%22%20)%3B%0A%2F%2F%20Create%20a%20new%20column%0Adt%20%26lt%3B%26lt%3B%20New%20Column(%20%22Sex_Class%22%2C%20character%2C%20formula(%20%3ASex%20%7C%7C%20%22_%22%20%7C%7C%20Char(%20%3AAge%20)%20)%20)%3B%0A%0A%2F%2F%20Determine%20how%20many%20groups%20in%20the%20%3ASex_Class%0ASummarize(%20dt%2C%20groups%20%3D%20by(%20%3ASex_Class%20)%20)%3B%0A%0A%2F%2F%20Create%20the%20value%20colors%20list%0Acolorlist%20%3D%20%7B%7D%3B%0AFor(%20i%20%3D%201%2C%20i%20%26lt%3B%3D%20N%20Items(%20groups%20)%2C%20i%2B%2B%2C%0A%20If(%20Substr(%20groups%5Bi%5D%2C%201%2C%201%20)%20%3D%3D%20%22F%22%2C%0A%20%20color%20%3D%2019%2C%0A%20%20color%20%3D%2021%0A%20)%3B%0A%20Eval(%0A%20%20Substitute(%0A%20%20%20%20Expr(%0A%20%20%20%20%20Insert%20Into(%20colorlist%2C%20__group__%20)%0A%20%20%20%20)%2C%0A%20%20%20Expr(%20__group__%20)%2C%20Parse(%20%22%7B%5C!%22%22%20%7C%7C%20groups%5Bi%5D%20%7C%7C%20%22%5C!%22%22%20%7C%7C%20%22%3D%22%20%7C%7C%20Char(%20color%20)%20%7C%7C%20%22%7D%22%20)%0A%20%20)%0A%20)%3B%0A)%3B%0A%0A%2F%2F%20Set%20the%20Value%20Colors%20property%20for%20the%20Sex_Class%20column%0Adt%3Asex_CLASS%20%26lt%3B%26lt%3B%20set%20property(%20%22value%20colors%22%2C%20Eval(%20colorlist%20)%20)%3B%0A%0Alinetype%20%3D%20%7B%22Solid%22%2C%20%22Dotted%22%2C%20%22DashDot%22%2C%20%22DashDotDot%22%2C%20%22Dashed%22%7D%3B%0A%0ATheExpr%20%3D%0A%22Oneway(%0A%20Y(%20%3Aweight%20)%2C%0A%20X(%20%3ASex_Class%20)%2C%0A%20All%20Graphs(%200%20)%2C%0A%20Plot%20Quantile%20by%20Actual(%201%20)%2C%0A%20Line%20of%20Fit(%200%20)%2C%0A%20X%20Axis%20Proportional(%200%20)%2C%0A%20Grand%20Mean(%200%20)%2C%0A%20SendToReport(%0A%20%20Dispatch(%0A%20%20%20%7B%7D%2C%0A%20%20%20%5C!%22222%5C!%22%2C%0A%20%20%20ScaleBox%2C%0A%20%20%20%7BLegend%20Model(%0A%20%20%20%201%2C%22%3B%0AFor(%20i%20%3D%201%2C%20i%20%26lt%3B%3D%20N%20Items(%20groups%20)%2C%20i%2B%2B%2C%0A%20If(%20i%20%26gt%3B%201%2C%0A%20%20TheExpr%20%3D%20TheExpr%20%7C%7C%20%22%2C%22%0A%20)%3B%0A%20TheExpr%20%3D%20TheExpr%20%7C%7C%20%22Properties(%22%20%7C%7C%20Char(%20i%20)%20%7C%7C%20%22%2C%20%7BLine%20Style(%5C!%22%22%20%7C%7C%20linetype%5BMod(%20i%2C%205%20)%20%2B%201%5D%20%7C%7C%20%22%5C!%22%20)%7D%20)%22%3B%0A)%3B%0ATheExpr%20%3D%20TheExpr%20%7C%7C%20%22)%2C%0A%20%20%20)%7D%0A%20%20%0A%20)%22%3B%0A%20%0AEval(%20Parse(%20theexpr%20)%20)%3B%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%E5%8F%AA%E6%9C%895%E7%A7%8D%E7%BA%BF%E5%9E%8B%E5%8F%AF%E4%BE%9B%E9%80%89%E6%8B%A9%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-39393%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%EF%BC%9A%E5%A6%82%E4%BD%95%E5%9C%A8CDF%E6%88%96%E5%88%86%E4%BD%8D%E6%95%B0%E5%9B%BE%E4%B8%AD%E6%94%B9%E5%8F%98%E7%BA%BF%E6%9D%A1%E9%A2%9C%E8%89%B2%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-39393%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%93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2%5Bj%5D%E6%97%B6%EF%BC%8C%E2%80%9C_%E2%80%9D%EF%BC%89%EF%BC%89%3B%20%3CBR%20%2F%3E%20Eval%EF%BC%88%E6%9B%BF%E4%BB%A3%EF%BC%88Expr%EF%BC%88%E6%8F%92%E5%85%A5%EF%BC%88colorlist%EF%BC%8C__%20group__%EF%BC%89%EF%BC%89%EF%BC%8Cexpr%EF%BC%88__%20group__%20%3CBR%20%2F%3E%20%EF%BC%89%EF%BC%8C%E8%A7%A3%E6%9E%90%EF%BC%88%E2%80%9C%7B%5C%EF%BC%81%E2%80%9D%E2%80%9C%7C%7C%20groups%20%5Bj%5D%20%7C%7C%E2%80%9D%5C%EF%BC%81%E2%80%9C%E2%80%9D%7C%7C%E2%80%9C%3D%E2%80%9D%7C%7C%20char%EF%BC%88color%EF%BC%89%7C%7C%E2%80%9C%7D%E2%80%9D%EF%BC%89%EF%BC%89%EF%BC%89%3B%20%3CBR%20%2F%3E%20%EF%BC%89%3B%20%3CBR%20%2F%3E%20DT%EF%BC%9Asex_class%20%26lt%3B%20%3CBR%20%2F%3E%E9%9D%9E%E5%B8%B8%E6%84%9F%E8%B0%A2%EF%BC%8C%E4%BD%86%E7%8E%B0%E5%9C%A8%E6%88%91%E5%8F%98%E5%BE%97%E8%B4%AA%E5%BF%83%E4%BA%86%E3%80%82%E5%A6%82%E4%BD%95%E6%8C%89%E7%8F%AD%E7%BA%A7%E6%94%B9%E5%8F%98%E7%A0%B4%E6%8A%98%E5%8F%B7%E9%A3%8E%E6%A0%BC%EF%BC%9F%3CBR%20%2F%3E%3CBR%20%2F%3E%E8%B0%A2%E8%B0%A2%EF%BC%8C%E8%8F%B2%E5%88%A9%E6%99%AE%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-39383%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%EF%BC%9A%E5%A6%82%E4%BD%95%E5%9C%A8CDF%E6%88%96%E5%88%86%E4%BD%8D%E6%95%B0%E5%9B%BE%E4%B8%AD%E6%94%B9%E5%8F%98%E7%BA%BF%E6%9D%A1%E9%A2%9C%E8%89%B2%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-39383%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E6%82%A8%E5%8F%AF%E4%BB%A5%E9%80%9A%E8%BF%87%E4%B8%BA%E6%82%A8%E6%AD%A3%E5%9C%A8%E4%BD%BF%E7%94%A8%E7%9A%84%EF%BC%9ASex_Class%E5%88%97%E8%AE%BE%E7%BD%AE%E6%89%80%E9%9C%80%E7%9A%84%E5%80%BC%E9%A2%9C%E8%89%B2%E6%9D%A5%E5%AE%9E%E7%8E%B0%E6%82%A8%E6%83%B3%E8%A6%81%E7%9A%84%E6%95%88%E6%9E%9C%E3%80%82%26nbsp%3B%20%E8%BF%99%E6%98%AFJSL%E5%81%9A%E7%9A%84%EF%BC%8C%E4%BD%86%E5%AE%83%E5%8F%AF%E4%BB%A5%E5%BE%88%E5%AE%B9%E6%98%93%E5%9C%B0%E4%BB%A5%E4%BA%A4%E4%BA%92%E6%96%B9%E5%BC%8F%E5%AE%8C%E6%88%90%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%5Cbig%20class.jmp%22%20)%3B%0A%2F%2F%20Create%20a%20new%20column%0Adt%20%26lt%3B%26lt%3B%20new%20column(%22Sex_Class%22%2C%20character%2C%20%0A%20formula(%3ASex%20%7C%7C%20%22_%22%20%7C%7C%20char(%3AAge))%0A)%3B%0A%0A%2F%2F%20Determine%20how%20many%20groups%20in%20the%20%3ASex_Class%0Asummarize(dt%2Cgroups%3Dby(%3ASex_Class))%3B%0A%0A%2F%2F%20Create%20the%20value%20colors%20list%0Acolorlist%3D%7B%7D%3B%0AFor(i%3D1%2Ci%26lt%3B%3Dn%20items(groups)%2Ci%2B%2B%2C%0A%20If(substr(groups%5Bi%5D%2C1%2C1)%3D%3D%22F%22%2C%0A%20%20color%3D19%2C%0A%20%20color%3D21%0A%20)%3B%0A%20Eval(%0A%20%20Substitute(%0A%20%20%20Expr(%0A%20%20%20%20insert%20into(colorlist%2C%20__group__%20%20))%2C%0A%20%20%20%20expr(%20__group__%20)%2C%20parse(%22%7B%5C!%22%22%7C%7Cgroups%5Bi%5D%7C%7C%22%5C!%22%22%7C%7C%22%3D%22%7C%7Cchar(color)%7C%7C%22%7D%22)%0A%20%20)%0A%20)%0A)%3B%0A%0A%2F%2F%20Set%20the%20Value%20Colors%20property%20for%20the%20Sex_Class%20column%0Adt%3Asex_CLASS%26lt%3B%3CSET%20property%3D%22%22%3E%3C%2FSET%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20603px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22valuecolors.PNG%22%20style%3D%22width%3A%20603px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F6212i9EC8C7B70A168C20%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22valuecolors.PNG%22%20alt%3D%22valuecolors.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-39380%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%EF%BC%9A%E5%A6%82%E4%BD%95%E5%9C%A8CDF%E6%88%96%E5%88%86%E4%BD%8D%E6%95%B0%E5%9B%BE%E4%B8%AD%E6%94%B9%E5%8F%98%E7%BA%BF%E6%9D%A1%E9%A2%9C%E8%89%B2%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-39380%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%AF%B9%E4%BA%8E%E8%BF%85%E9%80%9F%E7%9A%84%E5%8F%8D%E5%BA%94%E5%BE%88%E6%9C%89%E5%B8%AE%E5%8A%A9%E3%80%82%3CBR%20%2F%3E%E9%99%84%E4%BB%B6%E6%98%AF%E5%87%A0%E4%B8%AAM%20%2F%20F%E7%B1%BB%E7%9A%84%E4%BE%8B%E5%AD%90%E3%80%82%E6%AF%8F%E4%B8%AA%E7%8F%AD%E7%BA%A7%E9%83%BD%E6%9C%89%E8%87%AA%E5%B7%B1%E7%9A%84%E8%B7%AF%E7%BA%BF%3CBR%20%2F%3E%E4%BD%86%E6%98%AF%E7%94%B1%E6%80%A7%E5%88%AB%E5%AE%9A%E4%B9%89%E7%9A%84%E9%A2%9C%E8%89%B2%E3%80%82%3CBR%20%2F%3E%E5%9C%A8%E8%9B%8B%E7%B3%95%E4%B8%8A%E7%BB%93%E5%86%B0%E5%B0%86%E6%8C%89%E6%80%A7%E5%88%AB%E9%A2%9C%E8%89%B2%E5%92%8C%E7%A0%B4%E6%8A%98%E5%8F%B7%E7%B1%BB%E5%88%AB%3A)%20%3CBR%20%2F%3E%E8%8F%B2%E5%88%A9%E6%99%AE%3CBR%20%2F%3E%3CBR%20%2F%3E%E5%8D%95%E7%A8%8B%EF%BC%88%20%3CBR%20%2F%3E%20Y%EF%BC%88%EF%BC%9A%E9%87%8D%E9%87%8F%EF%BC%89%EF%BC%8C%3CBR%20%2F%3E%20X%EF%BC%88%EF%BC%9ASex_Class%EF%BC%89%EF%BC%8C%3CBR%20%2F%3E%E6%89%80%E6%9C%89%E5%9B%BE%E5%BD%A2%EF%BC%880%EF%BC%89%EF%BC%8C%E6%8C%89%E5%AE%9E%E9%99%85%EF%BC%881%EF%BC%89%E7%BB%98%E5%88%B6%E5%88%86%E4%BD%8D%E6%95%B0%EF%BC%8C%E6%8B%9F%E5%90%88%E7%BA%BF%EF%BC%880%EF%BC%89%EF%BC%8CX%E8%BD%B4%3CBR%20%2F%3E%E6%AF%94%E4%BE%8B%EF%BC%880%EF%BC%89%EF%BC%8C%E5%A4%A7%E5%9D%87%E5%80%BC%EF%BC%880%EF%BC%89%EF%BC%8C%E9%A2%9C%E8%89%B2%EF%BC%88%EF%BC%9A%E6%80%A7%E5%88%AB%EF%BC%89%EF%BC%8C%3CBR%20%2F%3E%20SendToReport%EF%BC%88%20%3CBR%20%2F%3E%20Dispatch%EF%BC%88%7B%E2%80%9CNormal%20Quantile%20Plot%E2%80%9D%7D%EF%BC%8C%E2%80%9COneway%20QuantilePlot%E2%80%9D%EF%BC%8CFrameBox%EF%BC%8C%7BLine%20%3CBR%20%2F%3E%E5%AE%BD%E5%BA%A6%E6%AF%94%E4%BE%8B%EF%BC%883%EF%BC%89%EF%BC%8C%E9%80%8F%E6%98%8E%E5%BA%A6%EF%BC%880%EF%BC%89%7D%EF%BC%89%EF%BC%8C%3CBR%20%2F%3E%20%EF%BC%89%20%3CBR%20%2F%3E%20%EF%BC%89%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-39377%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%EF%BC%9A%E5%A6%82%E4%BD%95%E5%9C%A8CDF%E6%88%96%E5%88%86%E4%BD%8D%E6%95%B0%E5%9B%BE%E4%B8%AD%E6%94%B9%E5%8F%98%E7%BA%BF%E6%9D%A1%E9%A2%9C%E8%89%B2%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-39377%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E6%88%91%E5%8F%AF%E4%BB%A5%E7%90%86%E8%A7%A3%E4%BD%A0%E5%A6%82%E4%BD%95%E9%80%9A%E8%BF%87%E4%B8%8D%E5%90%8C%E7%9A%84%E5%88%97%E4%B8%BA%E6%95%B0%E6%8D%AE%E7%82%B9%E7%9D%80%E8%89%B2%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%5Cbig%20class.jmp%22%20)%3B%0Adt%20%26lt%3B%26lt%3B%20Oneway(%0A%20Y(%20%3Aweight%20)%2C%0A%20X(%20%3Asex%20)%2C%0A%20All%20Graphs(%200%20)%2C%0A%20Plot%20Quantile%20by%20Actual(%201%20)%2C%0A%20Line%20of%20Fit(%200(1)%20)%2C%0A%20X%20Axis%20Proportional(%200%20)%2C%0A%20Grand%20Mean(%200%20)%0A)%3B%0Adt%20%26lt%3B%26lt%3B%20color%20by(%20%3Aage%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%E4%BD%86%E6%88%91%E4%B8%8D%E7%9F%A5%E9%81%93%E4%BD%A0%E6%98%AF%E5%A6%82%E4%BD%95%E7%9B%B4%E6%8E%A5%E7%94%A8%E7%BA%BF%E6%AE%B5%E5%81%9A%E7%9A%84%EF%BC%8C%E5%9B%A0%E4%B8%BA%E6%AF%8F%E4%B8%AA%E6%AE%B5%E9%83%BD%E9%93%BE%E6%8E%A5%E5%9C%A82%E4%B8%AA%E5%80%BC%E4%B9%8B%E9%97%B4%EF%BC%8C%E8%BF%99%E4%BA%9B%E5%80%BC%E5%8F%AF%E8%83%BD%E6%9C%892%E4%B8%AA%E4%B8%8D%E5%90%8C%E7%9A%84%E7%AC%AC3%E7%A7%8D%E9%A2%9C%E8%89%B2%E5%80%BC%E3%80%82%26nbsp%3B%26nbsp%3B%20%E4%BD%A0%E8%83%BD%E6%8F%90%E4%BE%9B%E4%B8%80%E4%B8%AA%E4%BD%A0%E6%AD%A3%E5%9C%A8%E6%80%9D%E8%80%83%E7%9A%84%E6%A8%A1%E5%9E%8B%E5%90%97%EF%BC%9F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
PPS
PPS
Level I

How to change line color in CDF or Quantile plot?

Hi,

I am generating cummulative plots like the example below.

However, I want to color of the lines not to be determined by col2 but by col3.

Adding Color ( :col3 ) didn't do the trick...

Thx, Phil

 

Oneway(
Y( :col1), X( :col2),
All Graphs( 0 ), Plot Quantile by Actual( 1 ), Line of Fit( 0 ), X Axis Proportional( 0 ), Grand Mean( 0 ), Color ( :col3 )
)

6 REPLIES 6
txnelson
Super User

Re: How to change line color in CDF or Quantile plot?

I can understand how you could color data points by a different column

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
dt << Oneway(
	Y( :weight ),
	X( :sex ),
	All Graphs( 0 ),
	Plot Quantile by Actual( 1 ),
	Line of Fit( 0(1) ),
	X Axis Proportional( 0 ),
	Grand Mean( 0 )
);
dt << color by( :age );

but I don't see how you directly do it with the line segments, since each segment is linked between 2 values that may have 2 different values of the 3rd color.   Could you provide a mockup of what you are thinking?

Jim
PPS
PPS
Level I

Re: How to change line color in CDF or Quantile plot?

Thx a lot for the swift response.
Attached is an example with several classes M/F. Each class has its line
but colors defined by sex.
Icing on the cake would be color by sex and dash type by class :)
Philipp

Oneway(
Y( :Weight ),
X( :Sex_Class),
All Graphs( 0 ), Plot Quantile by Actual( 1 ), Line of Fit( 0 ), X Axis
Proportional( 0 ), Grand Mean( 0 ), Color ( :sex ),
SendToReport(
Dispatch( {"Normal Quantile Plot"}, "Oneway QuantilePlot", FrameBox, {Line
Width Scale( 3 ), Transparency( 0 )} ),
)
)
txnelson
Super User

Re: How to change line color in CDF or Quantile plot?

You can achieve what you want by setting the Value Colors you want for the :Sex_Class column you are working with.  Here is the JSL to do it, but it can easily be done interactively

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
// Create a new column
dt << new column("Sex_Class", character, 
	formula(:Sex || "_" || char(:Age))
);

// Determine how many groups in the :Sex_Class
summarize(dt,groups=by(:Sex_Class));

// Create the value colors list
colorlist={};
For(i=1,i<=n items(groups),i++,
	If(substr(groups[i],1,1)=="F",
		color=19,
		color=21
	);
	Eval(
		Substitute(
			Expr(
				insert into(colorlist, __group__  )),
				expr( __group__ ), parse("{\!""||groups[i]||"\!""||"="||char(color)||"}")
		)
	)
);

// Set the Value Colors property for the Sex_Class column
dt:sex_CLASS<<set property("value colors",eval(colorlist));

dt << Oneway(
	Y( :weight ),
	X( :sex_class ),
	All Graphs( 0 ),
	Plot Quantile by Actual( 1 ),
	Line of Fit( 0(1) ),
	X Axis Proportional( 0 ),
	Grand Mean( 0 )
);

valuecolors.PNG

 

Jim
PPS
PPS
Level I

Re: How to change line color in CDF or Quantile plot?

Wow! I'm impressed! It works! I have modified the script to accommodate for
the case of more than 2 colors:

// Determine colors for lots
summarize(dt,groups=by(:sex_class));
colorlist={}; color=3; Sxcnt=Word(1,groups[1],"_");
For(j=1,j<=n items(groups),j++,
If(Not(Word(1,groups[j],"_")==Sxcnt),color=color+1;Sxcnt=Word(1,groups[j],"_"));
Eval(Substitute(Expr(insert into(colorlist, __group__ )), expr( __group__
), parse("{\!""||groups[j]||"\!""||"="||char(color)||"}") ) );
);
dt:sex_class<
Thanks a lot, but now I got greedy. What about changing dash style by class?

Thanks, Philipp
txnelson
Super User

Re: How to change line color in CDF or Quantile plot?

Try this on for size

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
// Create a new column
dt << New Column( "Sex_Class", character, formula( :Sex || "_" || Char( :Age ) ) );

// Determine how many groups in the :Sex_Class
Summarize( dt, groups = by( :Sex_Class ) );

// Create the value colors list
colorlist = {};
For( i = 1, i <= N Items( groups ), i++,
	If( Substr( groups[i], 1, 1 ) == "F",
		color = 19,
		color = 21
	);
	Eval(
		Substitute(
				Expr(
					Insert Into( colorlist, __group__ )
				),
			Expr( __group__ ), Parse( "{\!"" || groups[i] || "\!"" || "=" || Char( color ) || "}" )
		)
	);
);

// Set the Value Colors property for the Sex_Class column
dt:sex_CLASS << set property( "value colors", Eval( colorlist ) );

linetype = {"Solid", "Dotted", "DashDot", "DashDotDot", "Dashed"};

TheExpr =
"Oneway(
	Y( :weight ),
	X( :Sex_Class ),
	All Graphs( 0 ),
	Plot Quantile by Actual( 1 ),
	Line of Fit( 0 ),
	X Axis Proportional( 0 ),
	Grand Mean( 0 ),
	SendToReport(
		Dispatch(
			{},
			\!"222\!",
			ScaleBox,
			{Legend Model(
				1,";
For( i = 1, i <= N Items( groups ), i++,
	If( i > 1,
		TheExpr = TheExpr || ","
	);
	TheExpr = TheExpr || "Properties(" || Char( i ) || ", {Line Style(\!"" || linetype[Mod( i, 5 ) + 1] || "\!" )} )";
);
TheExpr = TheExpr || "),
			)}
		
	)";
	
Eval( Parse( theexpr ) );

There are only 5 line styles available

 

Jim
PPS
PPS
Level I

Re: How to change line color in CDF or Quantile plot?

Thanks again for your efforts.

I believe there were a few syntax errors in your script suggestion, which I
fixed. See below. However, I keep getting error messages like "Cannot find
ScaleBox[ "400" ] at {}", even if I go with "222" as you suggested. (BTW,
never understood what that number means) And the line styles are not
adjusted. Colors work ok as before.

thanks, Philipp

Expr =
"Oneway(
Y( :weight ),
X( :Sex_Class ),
All Graphs( 0 ),
Plot Quantile by Actual( 1 ),
Line of Fit( 0 ),
X Axis Proportional( 0 ),
Grand Mean( 0 ),
SendToReport(
Dispatch({},\!"400\!",
ScaleBox,
{Legend Model(1";
For( i = 1, i <= N Items( groups ), i++,
Expr = Expr || ",Properties(" || Char( i ) || ", {Line Style(\!"" ||
linetype[Mod( i, 5 ) + 1] || "\!" )} )";
);
Expr = Expr || ")})))";

Eval( Parse( Expr ) );

Recommended Articles