cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
%3CLINGO-SUB%20id%3D%22lingo-sub-783937%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%E4%BA%92%E5%8B%95%E6%9C%9F%E5%88%8A%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-783937%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%EF%BC%8C%3C%2FP%3E%0A%3CP%3E%E6%88%91%E6%AD%A3%E5%9C%A8%E8%88%87%20JMP%20%E5%90%88%E4%BD%9C%EF%BC%8C%E9%9C%80%E8%A6%81%E5%B9%AB%E5%8A%A9%E5%BB%BA%E7%AB%8B%E4%BA%92%E5%8B%95%E5%BC%8F%E6%97%A5%E8%AA%8C%E3%80%82%E6%88%91%E7%9A%84%E7%9B%AE%E6%A8%99%E6%98%AF%E5%8C%85%E5%90%AB%E4%B8%80%E9%A0%85%E5%8A%9F%E8%83%BD%EF%BC%8C%E5%85%81%E8%A8%B1%E4%BD%BF%E7%94%A8%E8%80%85%E9%81%B8%E6%93%87%E4%B8%A6%E7%AA%81%E5%87%BA%E9%A1%AF%E7%A4%BA%E5%9C%96%E8%A1%A8%E4%B8%AD%E7%9A%84%E7%89%B9%E5%AE%9A%E6%89%B9%E6%AC%A1%E3%80%82%E4%BB%A5%E4%B8%8B%E6%98%AF%E8%85%B3%E6%9C%AC%E7%9A%84%E8%A9%B3%E7%B4%B0%E8%B3%87%E8%A8%8A%E4%BB%A5%E5%8F%8A%E6%88%91%E6%83%B3%E8%A6%81%E5%AF%A6%E7%8F%BE%E7%9A%84%E7%9B%AE%E6%A8%99%EF%BC%9A%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(1)%3B%0A%0ACurrent%20Data%20Table(dt)%3B%0Adt%20%26lt%3B%26lt%3B%20New%20Column(%22Time%20Point%20Months%22%2C%20Formula(Round(%3ATime%20Point%20Days%20%2F%2030.438)%2C%202))%3B%0A%0A%2F%2F%20Loop%20for%20each%20parameter%0AFor(i%20%3D%201%2C%20i%20%26lt%3B%3D%20N%20Items(numPar)%2C%20i%2B%2B%2C%0A%09col1%20%3D%20Col%20Box(%22%22)%3B%0A%09col2%20%3D%20Col%20Box(%22%22)%3B%0A%09col3%20%3D%20Col%20Box(%22%22)%3B%0A%0A%2F%2F%20Create%20all%20batches%20plot%0A%09gb%20%3D%20Graph%20Builder(%0A%09%09invisible%2C%0A%09%09Size(500%2C%20500)%2C%0A%09%09Variables(X(%3ATime%20Point%20Months)%2C%20Y(%3AResult)%2C%20Overlay(%3ABatch))%2C%0A%09%09Elements(Points(X%2C%20Y))%0A%09)%3B%0A%09gb%20%26lt%3B%26lt%3B%20Local%20Data%20Filter(%0A%09%09Add%20Filter(%0A%09%09%09columns(%3AComponent%2C%20%3ABatch%2C%20%3ASource%20Table)%2C%0A%09%09%09Where(%3AComponent%20%3D%3D%20numPar%5Bi%5D)%2C%0A%09%09%09Where(%3ABatch%20%3D%3D%20%7Bcyc%2C%20bat%7D)%2C%0A%09%09%09Where(%3ASource%20Table%20%3D%3D%20dt_name)%0A%09%09)%0A%09)%3B%0A%09dt%20%26lt%3B%26lt%3B%20Clear%20Select()%3B%0A%0A%09gbb%20%3D%20Report(gb)%5BGraphBuilderBox(1)%5D%3B%0A%09gbb%20%26lt%3B%26lt%3B%20Add%20Element(1%2C%201%2C%20%7BType(%22Line%20Of%20Fit%22)%2C%20X%2C%20Y%2C%20Confidence%20of%20Fit(0)%2C%20Equation(0)%7D)%3B%0A%0A%2F%2F%20Set%20Y%20axis%0A%09minval%20%3D%20Min(%0A%09%09%3AResult%5Bdt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%20%7C%20%3ABatch%20%3D%3D%20bat%0A%09%09%09%20%26amp%3B%20%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%0A%09%09)%5D%0A%09)%20*%200.95%3B%0A%09maxval%20%3D%20Max(%0A%09%09%3AResult%5Bdt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%20%7C%20%3ABatch%20%3D%3D%20bat%0A%09%09%09%20%26amp%3B%20%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%0A%09%09)%5D%0A%09)%20*%201.05%3B%0A%09maxvalts%20%3D%20Max(%0A%09%09%3ATime%20Point%20Months%5Bdt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%20%7C%20%3ABatch%20%3D%3D%20bat%0A%09%09%09%20%26amp%3B%20%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%0A%09%09)%5D%0A%09)%20*%201.05%3B%0A%0A%09gbb%5BAxisBox(1)%5D%20%26lt%3B%26lt%3B%20Min(-0.1)%3B%0A%09gbb%5BAxisBox(1)%5D%20%26lt%3B%26lt%3B%20Max(maxvalts)%3B%0A%09gbb%5BAxisBox(2)%5D%20%26lt%3B%26lt%3B%20Min(minval)%3B%0A%09gbb%5BAxisBox(2)%5D%20%26lt%3B%26lt%3B%20Max(maxval)%3B%0A%09gbb%5BAxisBox(2)%5D%20%26lt%3B%26lt%3B%20inc((maxval%20-%20minval)%20%2F%2010)%3B%0A%0A%2F%2F%20Set%20Y%20axis%20label%0A%09unitList%20%3D%20Associative%20Array(%0A%09%09%3AResult%20Unit%5Bdt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%20%7C%20%3ABatch%20%3D%3D%20bat%0A%09%09%09%20%26amp%3B%20%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%0A%09%09)%5D%0A%09)%20%26lt%3B%26lt%3B%20Remove(%22%22)%20%26lt%3B%26lt%3B%20Get%20Keys%3B%0A%09If(N%20Items(unitList)%20%3D%3D%201%2C%0A%09%09gbb%5BText%20Edit%20Box(4)%5D%20%26lt%3B%26lt%3B%20Set%20text(numPar%5Bi%5D%20%7C%7C%20%22%20%5B%22%20%7C%7C%20unitList%5B1%5D%20%7C%7C%20%22%5D%22)%0A%09)%3B%0A%09If(N%20Items(unitList)%20!%3D%201%2C%0A%09%09gbb%5BText%20Edit%20Box(4)%5D%20%26lt%3B%26lt%3B%20Set%20text(numPar%5Bi%5D)%0A%09)%3B%0A%0A%2F%2F%20Set%20graph%20title%0A%09gbb%5BText%20Edit%20Box(1)%5D%20%26lt%3B%26lt%3B%20Set%20text(numPar%5Bi%5D%20%7C%7C%20%22%20vs.%20Time%20Point%20%22)%3B%0A%09gbba%20%3D%20Report(gb)%3B%0A%09col1%20%26lt%3B%26lt%3B%20Append(gbba)%3B%0A%09gb%20%26lt%3B%26lt%3B%20close%20window%3B%0A%0A%09For(k%20%3D%201%2C%20k%20%26lt%3B%3D%20N%20Items(cyc)%2C%20k%2B%2B%2C%0A%09%09check%20%3D%20dt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%5Bk%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%20%7C%20%3ABatch%20%3D%3D%0A%09%09%09bat%5Bk%5D%20%26amp%3B%20%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%0A%09%09)%3B%0A%09%09If(N%20Items(check)%20%26gt%3B%200%2C%0A%09%09%09gb%20%3D%20Graph%20Builder(%0A%09%09%09%09invisible%2C%0A%09%09%09%09Size(500%2C%20500)%2C%0A%09%09%09%09Variables(X(%3ATime%20Point%20Months)%2C%20Y(%3AResult)%2C%20Overlay(%3ABatch))%2C%0A%09%09%09%09Elements(Points(X%2C%20Y))%0A%09%09%09)%3B%0A%09%09%09gb%20%26lt%3B%26lt%3B%20Local%20Data%20Filter(%0A%09%09%09%09Add%20Filter(%0A%09%09%09%09%09columns(%3AComponent%2C%20%3ABatch%2C%20%3ASource%20Table)%2C%0A%09%09%09%09%09Where(%3AComponent%20%3D%3D%20numPar%5Bi%5D)%2C%0A%09%09%09%09%09Where(%3ABatch%20%3D%3D%20%7Bcyc%5Bk%5D%2C%20bat%5Bk%5D%7D)%2C%0A%09%09%09%09%09Where(%3ASource%20Table%20%3D%3D%20dt_name)%0A%09%09%09%09)%0A%09%09%09)%3B%0A%09%09%09dt%20%26lt%3B%26lt%3B%20Clear%20Select()%3B%0A%0A%09%09%09gbb%20%3D%20Report(gb)%5BGraphBuilderBox(1)%5D%3B%0A%09%09%09gbb%20%26lt%3B%26lt%3B%20Add%20Element(%0A%09%09%09%091%2C%0A%09%09%09%091%2C%0A%09%09%09%09%7BType(%22Line%20Of%20Fit%22)%2C%20X%2C%20Y%2C%20Confidence%20of%20Fit(0)%2C%20Equation(0)%7D%0A%09%09%09)%3B%0A%0A%09%09%09minval%20%3D%20Min(%0A%09%09%09%09%3AResult%5Bdt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%5Bk%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%20%7C%0A%09%09%09%09%09%3ABatch%20%3D%3D%20bat%5Bk%5D%20%26amp%3B%20%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%0A%09%09%09%09)%5D%0A%09%09%09)%20*%200.95%3B%0A%09%09%09maxval%20%3D%20Max(%0A%09%09%09%09%3AResult%5Bdt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%5Bk%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%20%7C%0A%09%09%09%09%09%3ABatch%20%3D%3D%20bat%5Bk%5D%20%26amp%3B%20%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%0A%09%09%09%09)%5D%0A%09%09%09)%20*%201.05%3B%0A%09%09%09maxvalts%20%3D%20Max(%0A%09%09%09%09%3ATime%20Point%20Months%5Bdt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%5Bk%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%20%7C%0A%09%09%09%09%09%3ABatch%20%3D%3D%20bat%5Bk%5D%20%26amp%3B%20%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%0A%09%09%09%09)%5D%0A%09%09%09)%20*%201.05%3B%0A%0A%09%09%09gbb%5BAxisBox(1)%5D%20%26lt%3B%26lt%3B%20Min(-0.1)%3B%0A%09%09%09gbb%5BAxisBox(1)%5D%20%26lt%3B%26lt%3B%20Max(maxvalts)%3B%0A%09%09%09gbb%5BAxisBox(2)%5D%20%26lt%3B%26lt%3B%20Min(minval)%3B%0A%09%09%09gbb%5BAxisBox(2)%5D%20%26lt%3B%26lt%3B%20Max(maxval)%3B%0A%09%09%09gbb%5BAxisBox(2)%5D%20%26lt%3B%26lt%3B%20inc((maxval%20-%20minval)%20%2F%2010)%3B%0A%0A%09%09%09unitList%20%3D%20Associative%20Array(%0A%09%09%09%09%3AResult%20Unit%5Bdt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%5Bk%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%20%7C%0A%09%09%09%09%09%3ABatch%20%3D%3D%20bat%5Bk%5D%20%26amp%3B%20%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%0A%09%09%09%09)%5D%0A%09%09%09)%20%26lt%3B%26lt%3B%20Remove(%22%22)%20%26lt%3B%26lt%3B%20Get%20Keys%3B%0A%09%09%09If(N%20Items(unitList)%20%3D%3D%201%2C%0A%09%09%09%09gbb%5BText%20Edit%20Box(4)%5D%20%26lt%3B%26lt%3B%20Set%20text(numPar%5Bi%5D%20%7C%7C%20%22%20%5B%22%20%7C%7C%20unitList%5B1%5D%20%7C%7C%20%22%5D%22)%0A%09%09%09)%3B%0A%09%09%09If(N%20Items(unitList)%20!%3D%201%2C%0A%09%09%09%09gbb%5BText%20Edit%20Box(4)%5D%20%26lt%3B%26lt%3B%20Set%20text(numPar%5Bi%5D)%0A%09%09%09)%3B%0A%0A%09%09%09gbb%5BText%20Edit%20Box(1)%5D%20%26lt%3B%26lt%3B%20Set%20text(numPar%5Bi%5D%20%7C%7C%20%22%20vs.%20Time%20Point%20%22)%3B%0A%09%09%09gbba%20%3D%20Report(gb)%3B%0A%09%09%09col2%20%26lt%3B%26lt%3B%20Append(gbba)%3B%0A%09%09%09gb%20%26lt%3B%26lt%3B%20close%20window%3B%0A%0A%09%09%09gb2%20%3D%20Graph%20Builder(%0A%09%09%09%09invisible%2C%0A%09%09%09%09Size(500%2C%20500)%2C%0A%09%09%09%09Variables(X(%3ATime%20Point%20Months)%2C%20Y(%3ADifference)%2C%20Color(%3ABatch))%2C%0A%09%09%09%09Elements(Points(X%2C%20Y))%0A%09%09%09)%3B%0A%09%09%09gb2%20%26lt%3B%26lt%3B%20Local%20Data%20Filter(%0A%09%09%09%09Add%20Filter(%0A%09%09%09%09%09columns(%3AComponent%2C%20%3ABatch%2C%20%3ASource%20Table)%2C%0A%09%09%09%09%09Where(%3AComponent%20%3D%3D%20numPar%5Bi%5D)%2C%0A%09%09%09%09%09Where(%3ABatch%20%3D%3D%20cyc%5Bk%5D)%2C%0A%09%09%09%09%09Where(%3ASource%20Table%20%3D%3D%20dt5_name)%0A%09%09%09%09)%0A%09%09%09)%3B%0A%09%09%09dt4%20%26lt%3B%26lt%3B%20Clear%20Select()%3B%0A%0A%09%09%09gbb2%20%3D%20Report(gb2)%5BGraphBuilderBox(1)%5D%3B%0A%09%09%09gbb2%20%26lt%3B%26lt%3B%20Add%20Element(1%2C%201%2C%20%7BType(%22Line%22)%2C%20X%2C%20Y%7D)%3B%0A%0A%09%09%09l_idx%20%3D%20dt4%20%26lt%3B%26lt%3B%20Get%20rows%20where(dt4%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%5Bk%5D)%3B%0A%09%09%09ul%20%3D%20Min(dt4%3AHC%5Bl_idx%5D)%3B%0A%0A%09%09%09If(Is%20Missing(ul)%2C%0A%09%09%09%09If(%0A%09%09%09%09%09Min(%0A%09%09%09%09%09%09%3ADifference%5Bdt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%09%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%5Bk%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%0A%09%09%09%09%09%09%09dt5_name%0A%09%09%09%09%09%09)%5D%0A%09%09%09%09%09)%20%3D%3D%200%2C%0A%09%09%09%09%09minval%20%3D%20-5%3B%0A%09%09%09%09%09maxval%20%3D%205%3B%0A%09%09%09%09%2C%0A%09%09%09%09%09minval%20%3D%20Min(%0A%09%09%09%09%09%09%3ADifference%5Bdt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%09%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%5Bk%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%0A%09%09%09%09%09%09%09dt5_name%0A%09%09%09%09%09%09)%5D%0A%09%09%09%09%09)%20*%200.95%3B%0A%09%09%09%09%09maxval%20%3D%20Max(%0A%09%09%09%09%09%09%3ADifference%5Bdt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%09%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%5Bk%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%0A%09%09%09%09%09%09%09dt5_name%0A%09%09%09%09%09%09)%5D%0A%09%09%09%09%09)%20*%201.05%3B%0A%09%09%09%09)%0A%09%09%09%2C%0A%09%09%09%09minval%20%3D%20Min(%0A%09%09%09%09%09%3ADifference%5Bdt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%5Bk%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt5_name%0A%09%09%09%09%09)%5D%2C%0A%09%09%09%09%09-ul%0A%09%09%09%09)%20*%201.05%3B%0A%09%09%09%09maxval%20%3D%20Max(%0A%09%09%09%09%09%3ADifference%5Bdt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%5Bk%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt5_name%0A%09%09%09%09%09)%5D%2C%0A%09%09%09%09%09ul%0A%09%09%09%09)%20*%201.05%3B%0A%09%09%09)%3B%0A%0A%09%09%09If(!Is%20Missing(ul)%2C%0A%09%09%09%09gbb2%5BAxisBox(2)%5D%20%26lt%3B%26lt%3B%20Add%20Ref%20Line(ul%2C%20%22solid%22%2C%20%22black%22%2C%20Char(Round(ul%2C%202)))%3B%0A%09%09%09%09gbb2%5BAxisBox(2)%5D%20%26lt%3B%26lt%3B%20Add%20Ref%20Line(-ul%2C%20%22solid%22%2C%20%22black%22%2C%20Char(Round(-ul%2C%202)))%3B%0A%09%09%09)%3B%0A%0A%09%09%09gbb2%5BAxisBox(2)%5D%20%26lt%3B%26lt%3B%20Add%20Ref%20Line(0%2C%20%22Dashed%22)%3B%0A%09%09%09gbb2%5BAxisBox(2)%5D%20%26lt%3B%26lt%3B%20Min(minval)%3B%0A%09%09%09gbb2%5BAxisBox(2)%5D%20%26lt%3B%26lt%3B%20Max(maxval)%3B%0A%09%09%09gbb2%5BAxisBox(2)%5D%20%26lt%3B%26lt%3B%20inc((maxval%20-%20minval)%20%2F%2010)%3B%0A%0A%09%09%09gbba2%20%3D%20Report(gb2)%3B%0A%09%09%09col3%20%26lt%3B%26lt%3B%20Append(gbba2)%3B%0A%09%09%09gb2%20%26lt%3B%26lt%3B%20close%20window%3B%0A%09%09)%3B%0A%09)%3B%0A%0A%09results%20%26lt%3B%26lt%3B%20append(ob%20%3D%20Outline%20Box(numPar%5Bi%5D%2C%20V%20List%20Box(col1%2C%20H%20List%20Box(col2%2C%20col3))))%3B%0A%09ob%20%26lt%3B%26lt%3B%20close%3B%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%E7%B7%A8%E8%BC%AF%EF%BC%88jthi%202024-08-26%EF%BC%89%EF%BC%9A%E6%96%B0%E5%A2%9E%E4%BA%86%20JSL%20%E6%A0%BC%E5%BC%8F%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3E%3CSTRONG%3E%E4%BA%92%E5%8B%95%E5%BC%8F%E4%B8%8B%E6%8B%89%E9%81%B8%E5%96%AE%3C%2FSTRONG%3E%3A%20I%20want%20to%20create%20a%20dropdown%20menu%20that%20lists%20the%20unique%20batch%20values%20(%3CCODE%3E%3ABatch%3C%2FCODE%3E%3CSPAN%3E%20%3C%2FSPAN%3Ecolumn)%20in%20my%20data%20table.%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3E%E5%8F%8D%E7%99%BD%E5%8A%9F%E8%83%BD%3C%2FSTRONG%3E%EF%BC%9A%E7%95%B6%E4%BD%BF%E7%94%A8%E8%80%85%E5%BE%9E%E4%B8%8B%E6%8B%89%E5%BC%8F%E9%81%B8%E5%96%AE%E4%B8%AD%E9%81%B8%E6%93%87%E6%89%B9%E6%AC%A1%E6%99%82%EF%BC%8C%E5%9C%96%E8%A1%A8%E4%B8%AD%E7%9A%84%E5%B0%8D%E6%87%89%E9%BB%9E%E6%87%89%E5%8F%8D%E7%99%BD%E9%A1%AF%E7%A4%BA%E3%80%82%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3E%E5%B5%8C%E5%85%A5%E6%97%A5%E8%A8%98%E4%B8%AD%3C%2FSTRONG%3E%EF%BC%9A%E4%B8%8B%E6%8B%89%E5%BC%8F%E9%81%B8%E5%96%AE%E5%92%8C%E5%9C%96%E8%A1%A8%E6%87%89%E5%B5%8C%E5%85%A5%E5%88%B0%E5%8F%AF%E4%BB%A5%E5%84%B2%E5%AD%98%E5%92%8C%E5%88%86%E4%BA%AB%E7%9A%84%E6%97%A5%E8%A8%98%E4%B8%AD%E3%80%82%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLI%3E%0A%3C%2FOL%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-783937%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CLINGO-LABEL%3E%E8%87%AA%E5%8B%95%E5%8C%96%E5%92%8C%E8%85%B3%E6%9C%AC%E7%B7%A8%E5%AF%AB%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3E%E5%9F%BA%E7%A4%8E%E8%B3%87%E6%96%99%E5%88%86%E6%9E%90%E8%88%87%E5%BB%BA%E6%A8%A1%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3E%E6%95%B8%E6%93%9A%E6%8E%A2%E7%B4%A2%E5%92%8C%E8%A6%96%E8%A6%BA%E5%8C%96%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-784212%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E8%A6%86%EF%BC%9A%E4%BA%92%E5%8B%95%E6%9C%9F%E5%88%8A%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-784212%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E8%A9%B2%E8%85%B3%E6%9C%AC%E7%9A%84%E6%9F%90%E4%BA%9B%E9%83%A8%E5%88%86%E5%9C%A8%E6%9F%90%E5%80%8B%E6%99%82%E5%88%BB%E8%B5%B7%E4%BD%9C%E7%94%A8%E4%BA%86%E5%97%8E%EF%BC%9F%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-785206%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E8%A6%86%EF%BC%9A%E4%BA%92%E5%8B%95%E6%9C%9F%E5%88%8A%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-785206%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%98%AF%E7%9A%84%EF%BC%8C%E8%85%B3%E6%9C%AC%E6%9C%89%E6%95%88%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Acara_con_una_leve_sonrisa%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar

Interactive journals

Hello,

I am working with JMP and need assistance with creating an interactive journal. My goal is to include a feature that allows users to select and highlight specific batches within a graph. Here are the details of the script and what I am trying to achieve:

 

 

Names Default To Here(1);

Current Data Table(dt);
dt << New Column("Time Point Months", Formula(Round(:Time Point Days / 30.438), 2));

// Loop for each parameter
For(i = 1, i <= N Items(numPar), i++,
	col1 = Col Box("");
	col2 = Col Box("");
	col3 = Col Box("");

// Create all batches plot
	gb = Graph Builder(
		invisible,
		Size(500, 500),
		Variables(X(:Time Point Months), Y(:Result), Overlay(:Batch)),
		Elements(Points(X, Y))
	);
	gb << Local Data Filter(
		Add Filter(
			columns(:Component, :Batch, :Source Table),
			Where(:Component == numPar[i]),
			Where(:Batch == {cyc, bat}),
			Where(:Source Table == dt_name)
		)
	);
	dt << Clear Select();

	gbb = Report(gb)[GraphBuilderBox(1)];
	gbb << Add Element(1, 1, {Type("Line Of Fit"), X, Y, Confidence of Fit(0), Equation(0)});

// Set Y axis
	minval = Min(
		:Result[dt << get rows where(
			:Component == numPar[i] & :Batch == cyc & :Source Table == dt_name | :Batch == bat
			 & :Component == numPar[i] & :Source Table == dt_name
		)]
	) * 0.95;
	maxval = Max(
		:Result[dt << get rows where(
			:Component == numPar[i] & :Batch == cyc & :Source Table == dt_name | :Batch == bat
			 & :Component == numPar[i] & :Source Table == dt_name
		)]
	) * 1.05;
	maxvalts = Max(
		:Time Point Months[dt << get rows where(
			:Component == numPar[i] & :Batch == cyc & :Source Table == dt_name | :Batch == bat
			 & :Component == numPar[i] & :Source Table == dt_name
		)]
	) * 1.05;

	gbb[AxisBox(1)] << Min(-0.1);
	gbb[AxisBox(1)] << Max(maxvalts);
	gbb[AxisBox(2)] << Min(minval);
	gbb[AxisBox(2)] << Max(maxval);
	gbb[AxisBox(2)] << inc((maxval - minval) / 10);

// Set Y axis label
	unitList = Associative Array(
		:Result Unit[dt << get rows where(
			:Component == numPar[i] & :Batch == cyc & :Source Table == dt_name | :Batch == bat
			 & :Component == numPar[i] & :Source Table == dt_name
		)]
	) << Remove("") << Get Keys;
	If(N Items(unitList) == 1,
		gbb[Text Edit Box(4)] << Set text(numPar[i] || " [" || unitList[1] || "]")
	);
	If(N Items(unitList) != 1,
		gbb[Text Edit Box(4)] << Set text(numPar[i])
	);

// Set graph title
	gbb[Text Edit Box(1)] << Set text(numPar[i] || " vs. Time Point ");
	gbba = Report(gb);
	col1 << Append(gbba);
	gb << close window;

	For(k = 1, k <= N Items(cyc), k++,
		check = dt << get rows where(
			:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt_name | :Batch ==
			bat[k] & :Component == numPar[i] & :Source Table == dt_name
		);
		If(N Items(check) > 0,
			gb = Graph Builder(
				invisible,
				Size(500, 500),
				Variables(X(:Time Point Months), Y(:Result), Overlay(:Batch)),
				Elements(Points(X, Y))
			);
			gb << Local Data Filter(
				Add Filter(
					columns(:Component, :Batch, :Source Table),
					Where(:Component == numPar[i]),
					Where(:Batch == {cyc[k], bat[k]}),
					Where(:Source Table == dt_name)
				)
			);
			dt << Clear Select();

			gbb = Report(gb)[GraphBuilderBox(1)];
			gbb << Add Element(
				1,
				1,
				{Type("Line Of Fit"), X, Y, Confidence of Fit(0), Equation(0)}
			);

			minval = Min(
				:Result[dt << get rows where(
					:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt_name |
					:Batch == bat[k] & :Component == numPar[i] & :Source Table == dt_name
				)]
			) * 0.95;
			maxval = Max(
				:Result[dt << get rows where(
					:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt_name |
					:Batch == bat[k] & :Component == numPar[i] & :Source Table == dt_name
				)]
			) * 1.05;
			maxvalts = Max(
				:Time Point Months[dt << get rows where(
					:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt_name |
					:Batch == bat[k] & :Component == numPar[i] & :Source Table == dt_name
				)]
			) * 1.05;

			gbb[AxisBox(1)] << Min(-0.1);
			gbb[AxisBox(1)] << Max(maxvalts);
			gbb[AxisBox(2)] << Min(minval);
			gbb[AxisBox(2)] << Max(maxval);
			gbb[AxisBox(2)] << inc((maxval - minval) / 10);

			unitList = Associative Array(
				:Result Unit[dt << get rows where(
					:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt_name |
					:Batch == bat[k] & :Component == numPar[i] & :Source Table == dt_name
				)]
			) << Remove("") << Get Keys;
			If(N Items(unitList) == 1,
				gbb[Text Edit Box(4)] << Set text(numPar[i] || " [" || unitList[1] || "]")
			);
			If(N Items(unitList) != 1,
				gbb[Text Edit Box(4)] << Set text(numPar[i])
			);

			gbb[Text Edit Box(1)] << Set text(numPar[i] || " vs. Time Point ");
			gbba = Report(gb);
			col2 << Append(gbba);
			gb << close window;

			gb2 = Graph Builder(
				invisible,
				Size(500, 500),
				Variables(X(:Time Point Months), Y(:Difference), Color(:Batch)),
				Elements(Points(X, Y))
			);
			gb2 << Local Data Filter(
				Add Filter(
					columns(:Component, :Batch, :Source Table),
					Where(:Component == numPar[i]),
					Where(:Batch == cyc[k]),
					Where(:Source Table == dt5_name)
				)
			);
			dt4 << Clear Select();

			gbb2 = Report(gb2)[GraphBuilderBox(1)];
			gbb2 << Add Element(1, 1, {Type("Line"), X, Y});

			l_idx = dt4 << Get rows where(dt4:Component == numPar[i] & :Batch == cyc[k]);
			ul = Min(dt4:HC[l_idx]);

			If(Is Missing(ul),
				If(
					Min(
						:Difference[dt << get rows where(
							:Component == numPar[i] & :Batch == cyc[k] & :Source Table ==
							dt5_name
						)]
					) == 0,
					minval = -5;
					maxval = 5;
				,
					minval = Min(
						:Difference[dt << get rows where(
							:Component == numPar[i] & :Batch == cyc[k] & :Source Table ==
							dt5_name
						)]
					) * 0.95;
					maxval = Max(
						:Difference[dt << get rows where(
							:Component == numPar[i] & :Batch == cyc[k] & :Source Table ==
							dt5_name
						)]
					) * 1.05;
				)
			,
				minval = Min(
					:Difference[dt << get rows where(
						:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt5_name
					)],
					-ul
				) * 1.05;
				maxval = Max(
					:Difference[dt << get rows where(
						:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt5_name
					)],
					ul
				) * 1.05;
			);

			If(!Is Missing(ul),
				gbb2[AxisBox(2)] << Add Ref Line(ul, "solid", "black", Char(Round(ul, 2)));
				gbb2[AxisBox(2)] << Add Ref Line(-ul, "solid", "black", Char(Round(-ul, 2)));
			);

			gbb2[AxisBox(2)] << Add Ref Line(0, "Dashed");
			gbb2[AxisBox(2)] << Min(minval);
			gbb2[AxisBox(2)] << Max(maxval);
			gbb2[AxisBox(2)] << inc((maxval - minval) / 10);

			gbba2 = Report(gb2);
			col3 << Append(gbba2);
			gb2 << close window;
		);
	);

	results << append(ob = Outline Box(numPar[i], V List Box(col1, H List Box(col2, col3))));
	ob << close;
);

Edit (jthi 2024-08-26): Added JSL formatting



  1. Interactive Dropdown Menu: I want to create a dropdown menu that lists the unique batch values (:Batch column) in my data table.
  2. Highlighting Functionality: When a user selects a batch from the dropdown menu, the corresponding points in the graph should be highlighted.
  3. Embedding in a Journal: The dropdown menu and the graph should be embedded in a journal that can be saved and shared.


2 REPLIES 2
Byron_JMP
Staff

Re: Interactive journals

Did parts of this script work at some point?

 

JMP Systems Engineer, Health and Life Sciences (Pharma)

Re: Interactive journals

Yes the script works