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-803149%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EJSL%2FJMP%20%E3%81%AB%E3%82%88%E3%82%8B%20R%20%E3%83%97%E3%83%AD%E3%83%83%E3%83%88%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-803149%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%B8%8B%E3%81%AB%E7%A4%BA%E3%81%99%E3%82%88%E3%81%86%E3%81%AA%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E3%81%8C%E3%81%82%E3%82%8A%E3%80%81R%20%E3%81%A7%E7%B0%A1%E5%8D%98%E3%81%AA%E8%A8%88%E7%AE%97%E3%82%92%E8%A1%8C%E3%81%84%E3%80%81JSL%20%E3%81%A7%E3%83%97%E3%83%AD%E3%83%83%E3%83%88%E3%82%92%E8%A1%A8%E7%A4%BA%E3%81%97%E3%81%9F%E3%81%84%E3%81%AE%E3%81%A7%E3%81%99%E3%81%8C%E3%80%81JSL%20%E3%81%A7%202%20%E3%81%A4%E3%81%AE%E3%83%97%E3%83%AD%E3%83%83%E3%83%88%E3%82%92%E8%A1%A8%E7%A4%BA%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%9B%E3%82%93%E3%80%82%E4%BB%A5%E4%B8%8B%E3%81%AE%E3%82%B3%E3%83%BC%E3%83%89%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B%E3%81%A8%E3%80%81%E3%83%97%E3%83%AD%E3%83%83%E3%83%88%201%20%E3%81%8C%E9%96%89%E3%81%98%E3%82%89%E3%82%8C%E3%80%81%E3%83%97%E3%83%AD%E3%83%83%E3%83%88%202%20%E3%81%AE%E3%81%BF%E3%81%8C%E8%A1%A8%E7%A4%BA%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%E3%81%93%E3%81%93%E3%81%A7%E8%AA%AC%E6%98%8E%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%82%8B%E5%86%85%E5%AE%B9%20(%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2FJMPer-Cable%2FGetting-started-with-the-JMP-to-R-Interface%2Fba-p%2F43920%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.jmp.com%2Ft5%2FJMPer-Cable%2FGetting-started-with-the-JMP-to-R-Interface%2Fba-p%2F43920%3C%2FA%3E%20)%20%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%82%88%E3%81%86%E3%81%A8%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F%E3%81%8C%E3%80%81%E3%81%86%E3%81%BE%E3%81%8F%E3%81%84%E3%81%8D%E3%81%BE%E3%81%9B%E3%82%93%E3%80%82%E5%8D%98%E7%B4%94%E3%81%AA%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%81%8B%E3%82%82%E3%81%97%E3%82%8C%E3%81%BE%E3%81%9B%E3%82%93%E3%81%8C%E3%80%81%E7%A7%81%E3%81%AF%20JSL%20%E3%81%AE%E5%88%9D%E5%BF%83%E8%80%85%E3%81%A7%E3%81%99%E3%80%82%E3%81%8A%E5%8A%9B%E6%B7%BB%E3%81%88%E3%81%84%E3%81%9F%E3%81%A0%E3%81%91%E3%82%8C%E3%81%B0%E5%B9%B8%E3%81%84%E3%81%A7%E3%81%99%E3%80%82%E5%8F%82%E8%80%83%E3%81%BE%E3%81%A7%E3%81%AB%E3%80%81%E7%A7%81%E3%81%AF%20JMP%2017.2%20%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%E5%90%8D%E5%89%8D%E3%81%AF%E3%83%87%E3%83%95%E3%82%A9%E3%83%AB%E3%83%88%E3%81%A7%E3%81%93%E3%81%93%E3%81%AB%E8%A8%AD%E5%AE%9A%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99(1)%3B%3C%2FP%3E%3CP%3EInclude(%22Dialog_script.jsl%22)%3B%20%2F%2F%20%E3%83%80%E3%82%A4%E3%82%A2%E3%83%AD%E3%82%B0%E3%82%92%E3%83%AD%E3%83%BC%E3%83%89%E3%81%97%E3%81%A6%E3%80%81%E9%81%B8%E6%8A%9E%E3%81%97%E3%81%9F%20X%20%E5%88%97%E3%81%A8%20Y%20%E5%88%97%E3%82%92%E5%8F%96%E5%BE%97%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3CBR%20%2F%3E%20dt%20%3D%20Current%20Data%20Table()%3B%20%2F%2F%20%E7%8F%BE%E5%9C%A8%E3%81%AE%E3%83%87%E3%83%BC%E3%82%BF%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB%E3%82%92%E5%8F%96%E5%BE%97%E3%81%97%E3%81%BE%E3%81%99%3C%2FP%3E%3CP%3E%2F%2F%20%E3%83%87%E3%83%BC%E3%82%BF%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB%E3%81%8B%E3%82%89%E9%81%B8%E6%8A%9E%E3%81%95%E3%82%8C%E3%81%9FX%E5%88%97%E3%81%A8Y%E5%88%97%E3%82%92%E5%8F%96%E5%BE%97%E3%81%97%E3%81%BE%E3%81%99%3CBR%20%2F%3ExCol%20%3D%20%E5%88%97(dt%E3%80%81xColName%5B1%5D)%3B%3CBR%20%2F%3E%20yCol%20%3D%20%E5%88%97(dt%E3%80%81yColName%5B1%5D)%3B%3C%2FP%3E%3CP%3E%2F%2F%20%E5%88%97%E3%81%8C%E5%AD%98%E5%9C%A8%E3%81%99%E3%82%8B%E3%81%8B%E3%81%A9%E3%81%86%E3%81%8B%E7%A2%BA%E8%AA%8D%E3%81%99%E3%82%8B%3CBR%20%2F%3ExCol%20%3D%3D%20%E7%A9%BA()%20%7C%20yCol%20%3D%3D%20%E7%A9%BA()%E3%81%AE%E5%A0%B4%E5%90%88%E3%80%81%3CBR%20%2F%3E%20Throw(%22%E3%82%A8%E3%83%A9%E3%83%BC%3A%20%E9%81%B8%E6%8A%9E%E3%81%95%E3%82%8C%E3%81%9F%E5%88%97%E3%81%AF%E3%83%87%E3%83%BC%E3%82%BF%20%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB%E3%81%AB%E5%AD%98%E5%9C%A8%E3%81%97%E3%81%BE%E3%81%9B%E3%82%93%E3%80%82%22)%3B%3CBR%20%2F%3E%20)%3B%3C%2FP%3E%3CP%3E%2F%2F%20xCol%E3%81%A8yCol%E3%81%8B%E3%82%89%E5%80%A4%E3%82%92%E6%8A%BD%E5%87%BA%E3%81%97%E3%81%BE%E3%81%99%3CBR%20%2F%3ExValues%20%3D%20xCol%20%26lt%3B%26lt%3B%20Get%20Values%3B%20%2F%2F%20xCol%E3%81%AE%E5%80%A4%E3%82%92%E5%8F%96%E5%BE%97%E3%81%97%E3%81%BE%E3%81%99%3CBR%20%2F%3EyValues%20%3D%20yCol%20%26lt%3B%26lt%3B%20Get%20Values%3B%20%2F%2F%20yCol%E3%81%AE%E5%80%A4%E3%82%92%E5%8F%96%E5%BE%97%E3%81%97%E3%81%BE%E3%81%99%3C%2FP%3E%3CP%3E%2F%2F%20R%20%E3%81%AB%E9%80%81%E4%BF%A1%E3%81%95%E3%82%8C%E3%82%8B%E5%80%A4%E3%82%92%E8%A1%A8%E7%A4%BA%E3%81%97%E3%81%BE%E3%81%99%20(%E3%83%87%E3%83%90%E3%83%83%E3%82%B0%E7%94%A8)%3CBR%20%2F%3E%E8%A1%A8%E7%A4%BA(xValues)%3B%3CBR%20%2F%3E%E8%A1%A8%E7%A4%BA(y%E5%80%A4)%3B%3C%2FP%3E%3CP%3E%2F%2F%20R%E6%8E%A5%E7%B6%9A%E3%82%92%E5%88%9D%E6%9C%9F%E5%8C%96%E3%81%99%E3%82%8B%3CBR%20%2F%3ER%20%E5%88%9D%E6%9C%9F%E5%8C%96()%3B%3C%2FP%3E%3CP%3E%2F%2F%20xCol%E3%81%A8yCol%E3%81%AE%E5%80%A4%E3%82%92%E6%95%B0%E5%80%A4%E3%83%99%E3%82%AF%E3%83%88%E3%83%AB%E3%81%A8%E3%81%97%E3%81%A6R%E3%81%AB%E9%80%81%E4%BF%A1%E3%81%97%E3%81%BE%E3%81%99%3CBR%20%2F%3ER%20%E9%80%81%E4%BF%A1(xValues)%3B%3CBR%20%2F%3E%20R%20%E9%80%81%E4%BF%A1(y%E5%80%A4)%3B%3C%2FP%3E%3CP%3E%2F%2F%20%E5%A4%96%E9%83%A8%E3%81%AER%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B%3CBR%20%2F%3ER%20%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%92%E9%80%81%E4%BF%A1%E3%81%97%E3%81%BE%E3%81%99%20(%20%22C%3A%2FUsers%2FNDS%2FData_Ana.R%22%20)%3B%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%2F%2F%20%E3%83%97%E3%83%AD%E3%83%83%E3%83%88%E3%82%92%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B%3CBR%20%2F%3ER%20%E9%80%81%E4%BF%A1(%20%22print(plot1)%22%20)%3B%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3ER%20%E9%80%81%E4%BF%A1(%20%22print(plot2)%22%20)%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%2F%2F%20R%E6%8E%A5%E7%B6%9A%E3%82%92%E7%B5%82%E4%BA%86%E3%81%99%E3%82%8B%3CBR%20%2F%3E%2F%2FR%20%E7%94%A8%E8%AA%9E()%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-803149%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3E%E8%87%AA%E5%8B%95%E5%8C%96%E3%81%A8%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3E%E3%83%87%E3%83%BC%E3%82%BF%E3%81%AE%E6%8E%A2%E7%B4%A2%E3%81%A8%E8%A6%96%E8%A6%9A%E5%8C%96%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3E%E3%82%A6%E3%82%A3%E3%83%B3%E3%83%89%E3%82%A6%E3%82%BA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-803263%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20JSL%2FJMP%20%E3%81%AB%E3%82%88%E3%82%8B%20R%20%E3%83%97%E3%83%AD%E3%83%83%E3%83%88%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-803263%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E3%81%8A%E3%81%9D%E3%82%89%E3%81%8F%E3%80%81Wait()%20%E3%82%84%E3%80%81%E7%94%BB%E5%83%8F%E3%82%92%E3%82%AD%E3%83%A3%E3%83%97%E3%83%81%E3%83%A3%E3%81%97%E3%81%9F%E3%82%8A%E6%96%B0%E3%81%97%E3%81%84%20JMP%20%E3%82%A6%E3%82%A3%E3%83%B3%E3%83%89%E3%82%A6%E3%81%AB%E7%94%BB%E5%83%8F%E3%82%92%E8%A1%A8%E7%A4%BA%E3%81%97%E3%81%9F%E3%82%8A%E3%81%99%E3%82%8B%E3%82%B3%E3%83%BC%E3%83%89%E3%81%8C%E4%BB%8B%E5%9C%A8%E3%81%97%E3%81%A6%E3%81%84%E3%81%AA%E3%81%84%E3%81%9F%E3%82%81%E3%80%81%E3%83%97%E3%83%AD%E3%83%83%E3%83%88%202%20%E3%81%8C%E3%83%97%E3%83%AD%E3%83%83%E3%83%88%201%20%E3%82%92%E5%8D%B3%E5%BA%A7%E3%81%AB%E7%BD%AE%E3%81%8D%E6%8F%9B%E3%81%88%E3%81%A6%E3%81%84%E3%82%8B%E3%81%AE%E3%81%8C%E3%82%8F%E3%81%8B%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82R%20%E3%81%AE%20plot()%20%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B%E3%81%A8%E3%80%81JMP%20%E3%82%A6%E3%82%A3%E3%83%B3%E3%83%89%E3%82%A6%E3%81%A7%E3%81%AF%E3%81%AA%E3%81%8F%20R%20%E3%82%A6%E3%82%A3%E3%83%B3%E3%83%89%E3%82%A6%E3%81%8C%E8%A1%A8%E7%A4%BA%E3%81%95%E3%82%8C%E3%82%8B%E3%81%9F%E3%82%81%E3%80%812%20%E7%95%AA%E7%9B%AE%E3%81%AE%E3%83%97%E3%83%AD%E3%83%83%E3%83%88%20%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B%E3%81%A8%E3%80%81%E6%9C%80%E5%88%9D%E3%81%AE%E3%83%97%E3%83%AD%E3%83%83%E3%83%88%E3%81%8C%E4%B8%8A%E6%9B%B8%E3%81%8D%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%E5%8F%82%E7%85%A7%E3%81%97%E3%81%9F%E3%83%AA%E3%83%B3%E3%82%AF%E3%81%8B%E3%82%89%E3%80%81R%20Get%20Graphics()%20%E3%81%AE%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3%E3%82%92%E5%8F%82%E7%85%A7%E3%81%97%E3%81%A6%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84%E3%80%82%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3E%E6%AC%A1%E3%81%AE%E3%82%88%E3%81%86%E3%81%AA%E3%81%93%E3%81%A8%E3%82%92%E8%A9%A6%E3%81%97%E3%81%A6%E3%81%BF%E3%81%A6%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E...%0AR%20Submit(%22print(plot1)%22)%3B%0ANew%20Window(%22Plot%201%22%2C%20Picture%20Box(%20R%20Get%20Graphics(png)%20)%20)%3B%0AR%20Submit(%22print(plot2)%22)%3B%0ANew%20Window(%22Plot%202%22%2C%20Picture%20Box(%20R%20Get%20Graphics(png)%20)%20)%3B%0A...%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%E3%83%98%E3%83%AB%E3%83%97%E3%83%A1%E3%83%8B%E3%83%A5%E3%83%BC%E3%81%AE%E4%B8%8B%E3%81%AB%E3%81%82%E3%82%8BJMP%E3%81%AE%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E7%B4%A2%E5%BC%95%E3%81%AE%E4%BE%8B%E3%82%92%E3%81%94%E8%A6%A7%E3%81%AB%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%97%E3%81%9F%E3%81%8B%E3%80%82%E4%BB%A5%E4%B8%8B%E3%81%AE%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E3%81%AF%E3%80%81%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E7%B4%A2%E5%BC%95%E3%80%8CR%20Get%20Graphics%E3%80%8D%E3%81%8B%E3%82%89%E3%81%AE%E3%82%82%E3%81%AE%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0AR%20Init()%3B%0AR%20Submit(%20%22plot(1%3A10)%22%20)%3B%0Aplot%20%3D%20R%20Get%20Graphics(%20png%20)%3B%0ANew%20Window(%20%22Plot%22%2C%20Picture%20Box(%20plot%20)%20)%3B%0AR%20Term()%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-804938%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20JSL%2FJMP%20%E3%81%AB%E3%82%88%E3%82%8B%20R%20%E3%83%97%E3%83%AD%E3%83%83%E3%83%88%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-804938%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF%E3%80%81%E3%83%9D%E3%83%BC%E3%83%AB%E3%81%95%E3%82%93%E3%80%82%E5%9B%9E%E7%AD%94%E3%81%82%E3%82%8A%E3%81%8C%E3%81%A8%E3%81%86%E3%81%94%E3%81%96%E3%81%84%E3%81%BE%E3%81%99%E3%80%82R%20%E3%81%A7%E3%81%AF%E3%81%AA%E3%81%8F%20Python%20%E3%81%A7%E5%90%8C%E3%81%98%E3%83%97%E3%83%AD%E3%82%BB%E3%82%B9%E3%82%92%E7%B9%B0%E3%82%8A%E8%BF%94%E3%81%9D%E3%81%86%E3%81%A8%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%3CBR%20%2F%3E%3CBR%20%2F%3E%E3%81%9D%E3%81%97%E3%81%A6%E3%80%81JSL%20%E3%81%AF%E6%AD%A3%E3%81%97%E3%81%84%E5%9B%B3%E3%82%92%E3%83%97%E3%83%AD%E3%83%83%E3%83%88%E3%81%99%E3%82%8B%E4%BB%A3%E3%82%8F%E3%82%8A%E3%81%AB%E3%80%81Python%20%E3%81%8B%E3%82%89%E6%9C%80%E5%BE%8C%E3%81%AB%E5%AE%9A%E7%BE%A9%E3%81%95%E3%82%8C%E3%81%9F%E3%83%97%E3%83%AD%E3%83%83%E3%83%88%E3%82%92%E8%AA%AD%E3%81%BF%E8%BE%BC%E3%81%BF%E7%B6%9A%E3%81%91%E3%81%BE%E3%81%99%E3%80%82%3CBR%20%2F%3E%3CBR%20%2F%3E%20plt.show(plt.figure(plot1))%20%E3%81%AF%20Python%20%E3%81%A7%E3%81%AF%E6%A9%9F%E8%83%BD%E3%81%97%E3%81%BE%E3%81%99%E3%81%8C%E3%80%81%E4%BB%A5%E4%B8%8B%E3%81%AE%E3%82%B3%E3%83%BC%E3%83%89%E3%82%92%20JSL%20%E3%81%A7%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8B%E3%81%A8%3A%3CBR%20%2F%3E%20plot1%20%3D%20Picture%20Box(Python%20Get%20Graphics(%22png%22%2C%22plt.show(plt.figure(plot1)%22))%3B%3C%2FP%3E%3CP%3E%E3%81%9D%E3%81%AE%E5%BE%8C%E3%80%81JSL%20%E3%81%AF%E6%9C%80%E5%BE%8C%E3%81%AB%E5%AE%9A%E7%BE%A9%E3%81%95%E3%82%8C%E3%81%9F%E3%83%97%E3%83%AD%E3%83%83%E3%83%88%E3%82%92%E5%8F%96%E5%BE%97%E3%81%97%E7%B6%9A%E3%81%91%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%E7%A7%81%E3%81%8C%E4%BD%95%E3%82%92%E9%96%93%E9%81%95%E3%81%A3%E3%81%A6%E3%81%84%E3%82%8B%E3%81%AE%E3%81%8B%E3%80%81%E4%BD%95%E3%81%8B%E3%82%A2%E3%83%89%E3%83%90%E3%82%A4%E3%82%B9%E3%81%AF%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%81%8B%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-805156%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20JSL%2FJMP%20%E3%81%AB%E3%82%88%E3%82%8B%20R%20%E3%83%97%E3%83%AD%E3%83%83%E3%83%88%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-805156%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E3%81%BE%E3%81%9A%E3%80%81%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%20%E3%82%A4%E3%83%B3%E3%83%87%E3%83%83%E3%82%AF%E3%82%B9%E3%81%AE%E3%83%89%E3%82%AD%E3%83%A5%E3%83%A1%E3%83%B3%E3%83%88%E3%81%8B%E3%82%89%E3%80%81%E6%A7%8B%E6%96%87%3A%20image%20%3D%20Python%20Get%20Graphics(%20format%20)%3B%3C%2FP%3E%0A%3CP%3E2%20%E7%95%AA%E7%9B%AE%E3%81%AE%E3%83%91%E3%83%A9%E3%83%A1%E3%83%BC%E3%82%BF%E3%81%AF%E3%81%82%E3%82%8A%E3%81%BE%E3%81%9B%E3%82%93%E3%80%82%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%20%E3%82%A4%E3%83%B3%E3%83%87%E3%83%83%E3%82%AF%E3%82%B9%E3%81%AE%E8%AA%AC%E6%98%8E%E3%81%AB%E3%81%AF%E3%80%81%E6%AC%A1%E3%81%AE%E3%82%88%E3%81%86%E3%81%AB%E8%A8%98%E8%BC%89%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%3A%20%3CEM%3Eformat%20%E3%83%91%E3%83%A9%E3%83%A1%E3%83%BC%E3%82%BF%E3%81%A7%E6%8C%87%E5%AE%9A%E3%81%95%E3%82%8C%E3%81%9F%E3%82%B0%E3%83%A9%E3%83%95%E3%82%A3%E3%83%83%E3%82%AF%E5%BD%A2%E5%BC%8F%E3%81%A7%E3%80%81Python%20%E3%82%B0%E3%83%A9%E3%83%95%E8%A1%A8%E7%A4%BA%E3%82%A6%E3%82%A3%E3%83%B3%E3%83%89%E3%82%A6%E3%81%AB%E6%9B%B8%E3%81%8D%E8%BE%BC%E3%81%BE%E3%82%8C%E3%81%9F%E6%9C%80%E5%BE%8C%E3%81%AE%E3%82%B0%E3%83%A9%E3%83%95%E3%82%A3%E3%83%83%E3%82%AF%20%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%82%92%E8%BF%94%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3E%E6%AC%A1%E3%81%AB%E3%80%81%20%3CSPAN%3EJMP%2018%20%E3%82%88%E3%82%8A%E5%89%8D%E3%81%AE%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E3%81%AE%20JMP%20%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8B%E5%BF%85%E8%A6%81%E3%81%8C%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20face%3D%22inherit%22%3EPython%20Get%20Graphics(png)%3B%20%E3%81%AF%2018%20%E3%81%A7%E9%9D%9E%E6%8E%A8%E5%A5%A8%E3%81%A8%E3%81%AA%E3%82%8A%E3%80%81JMP%2019%3C%2FFONT%3E%E9%96%8B%E7%99%BA%3CFONT%20face%3D%22inherit%22%3E%E3%83%93%E3%83%AB%E3%83%89%E3%81%8B%E3%82%89%E3%81%99%E3%81%A7%E3%81%AB%E5%89%8A%E9%99%A4%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82JMP%2018%20%E3%81%A7%E3%81%AF%E3%80%81%E5%80%A4%E3%82%92%E8%BF%94%E3%81%95%E3%81%9A%E3%80%81%E4%BB%A3%E3%82%8F%E3%82%8A%E3%81%AB%E8%AD%A6%E5%91%8A%E3%83%80%E3%82%A4%E3%82%A2%E3%83%AD%E3%82%B0%E3%82%92%E8%A1%A8%E7%A4%BA%E3%81%97%E3%81%BE%E3%81%99%E3%80%82JMP%20%E3%81%AE%E3%81%99%E3%81%B9%E3%81%A6%E3%81%AE%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E3%81%A7%E9%81%A9%E5%88%87%E3%81%AA%E6%96%B9%E6%B3%95%E3%81%AF%E3%80%81Python%20%E3%82%B3%E3%83%BC%E3%83%89%E3%81%A7%E7%94%BB%E5%83%8F%E3%82%92%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%AB%E4%BF%9D%E5%AD%98%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%81%A7%E3%81%99%3C%2FFONT%3E%E3%80%82%E6%AC%A1%E3%81%AB%E3%80%81%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%92%20Open()%20%E3%81%97%E3%81%A6%E3%80%81%E3%81%9D%E3%82%8C%E3%82%92%20JSL%20Picture%20Box()%20%E3%81%AB%E6%B8%A1%E3%81%97%E3%81%BE%E3%81%99%E3%80%82JMP%2018%20%E3%81%AE%20Python%20Get%20Graphics()%20%E3%81%AE%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%20%E3%82%A4%E3%83%B3%E3%83%87%E3%83%83%E3%82%AF%E3%82%B9%E3%81%AB%E3%81%AF%E3%80%81%E5%9B%9E%E9%81%BF%E7%AD%96%E3%81%AE%E5%AE%8C%E5%85%A8%E3%81%AA%E4%BE%8B%E3%81%8C%E8%A8%98%E8%BC%89%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%0A%3CP%3Eplt.show()%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B%E4%BB%A3%E3%82%8F%E3%82%8A%E3%81%AB%3C%2FP%3E%0A%3CP%3E%E6%AC%A1%E3%81%AE%E3%81%93%E3%81%A8%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B%E5%BF%85%E8%A6%81%E3%81%8C%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-python%22%3E%3CCODE%3E%23%20save%20image%20to%20location%20of%20your%20choosing%20%0Aplt.savefig(%20jmp.TEMP%20%2B%20'get_graphics_img.png')%20%23%20JMP%2018%2B%0A%0A%23%20or%20...%20savefig(%20'%2Ftmp%2Fget_graphics_img.png')%20%20before%20JMP%2018%20(macOS).%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%E6%AC%A1%E3%81%AB%E3%80%81JSL%E3%81%8B%E3%82%89%3A%3CEM%3E%E3%81%BE%E3%81%9F%E3%81%AFPython%E3%81%8B%E3%82%89jmp.run_jsl('''%20...%20'''')%E7%B5%8C%E7%94%B1%E3%81%A7%3C%2FEM%3E%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%2F%2F%20plot%20%3D%20Python%20Get%20Graphics(%20png%20)%3B%20%20%20%20%20%20%20%2F%2F%20DEPRECATED%0ApngJMP%20%3D%20New%20Window(%20%22Plot%22%2C%20Picture%20Box(%20Open(%20%22%24TEMP%2Fget_graphics_img.png%22%2C%20png%20)%20)%20)%3B%0APython%20Submit(%20%22plt.close()%22%20)%3B%0Arc%20%3D%20Delete%20File(%20%22%24TEMP%2Fget_graphics_img.png%22%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%E4%BB%96%E3%81%AB%E3%82%82%E5%95%8F%E9%A1%8C%E3%81%8C%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%E7%89%B9%E3%81%AB%20Mac%20%E3%81%A7%E5%AE%9F%E8%A1%8C%E3%81%97%E3%81%A6%E3%81%84%E3%82%8B%E5%A0%B4%E5%90%88%E3%80%81matplotlib%20%E3%81%8C%E5%AF%BE%E8%A9%B1%E7%9A%84%E3%81%AB%E8%B5%B7%E5%8B%95%E3%81%95%E3%82%8C%E3%82%8B%E3%81%A8%E3%80%81matplotlib%20%E3%81%A8%20JMP%20%E3%81%AF%E3%82%A6%E3%82%A3%E3%83%B3%E3%83%89%E3%82%A6%20%E3%82%A4%E3%83%99%E3%83%B3%E3%83%88%20%E3%83%AB%E3%83%BC%E3%83%97%E3%81%AE%E5%88%B6%E5%BE%A1%E3%82%92%E4%BA%89%E3%81%86%E3%81%93%E3%81%A8%E3%81%AB%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%E7%94%BB%E9%9D%A2%E3%81%AB%E8%A1%A8%E7%A4%BA%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%82%8B%E6%9C%80%E5%BE%8C%E3%81%AE%20matplotlib%20%E3%82%A6%E3%82%A3%E3%83%B3%E3%83%89%E3%82%A6%E3%82%92%E9%96%89%E3%81%98%E3%82%8B%E3%81%A8%E3%80%81JMP%20%E3%82%92%E7%B5%82%E4%BA%86%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%99%E3%80%82%E3%81%93%E3%82%8C%E3%81%AF%20matplotlib%20%E3%83%90%E3%83%83%E3%82%AF%E3%82%A8%E3%83%B3%E3%83%89%E3%81%AB%E4%BE%9D%E5%AD%98%E3%81%97%E3%81%BE%E3%81%99%E3%81%8C%E3%80%81macOS%20%E3%81%A7%E3%81%AF%E7%89%B9%E3%81%AB%E5%8E%84%E4%BB%8B%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar

R-plot though JSL/JMP

I have this script as seen below where I calculate some simple in R, and where I want to see some plots in JSL. I cannot get JSL to show the two plots. When I run the code below it close plot1 and only show plot two. I have tried using what is descirbed here ( https://community.jmp.com/t5/JMPer-Cable/Getting-started-with-the-JMP-to-R-Interface/ba-p/43920 ) but I cannot get it to work. It might be a simple command but I am pretty new to JSL. I hope you can help. FYI I use JMP 17.2 

Names Default To Here(1);

Include("Dialog_script.jsl"); // Load the dialog to get selected X and Y columns
dt = Current Data Table(); // Get the current data table

// Get the selected X and Y columns from the data table
xCol = Column(dt, xColName[1]);
yCol = Column(dt, yColName[1]);

// Check if columns exist
If(xCol == Empty() | yCol == Empty(),
Throw("Error: The selected columns do not exist in the data table.");
);

// Extract the values from xCol and yCol
xValues = xCol << Get Values; // Get the values of xCol
yValues = yCol << Get Values; // Get the values of yCol

// Show the values being sent to R (for debugging)
Show(xValues);
Show(yValues);

// Initialize the R connection
R Init();

// Send the values of xCol and yCol to R as numeric vectors
R Send( xValues );
R Send( yValues );

// Execute the external R script
R Submit File( "C:/Users/NDS/Data_Ana.R" );

 

 

 

// Retrieve the plot 
 R submit( "print(plot1)" );

 

R submit( "print(plot2)" );

 

// Terminate the R connection
//R Term();

1 ACCEPTED SOLUTION

Accepted Solutions

Re: R-plot though JSL/JMP

I believe what you are seeing is plot 2 immediately replaces plot 1 as you have no intervening Wait() or code to capture the image or display the image in a new JMP window.  In running R's plot() you are getting an R window not a JMP window, so when you run the second plot command it's overwriting the first plot.  From the link you referenced, see the section on R Get Graphics().

 

Try something like

...
R Submit("print(plot1)");
New Window("Plot 1", Picture Box( R Get Graphics(png) ) );
R Submit("print(plot2)");
New Window("Plot 2", Picture Box( R Get Graphics(png) ) );
...

Have you looked at the examples in JMP's scripting index, that is located under the Help menu.  The script below comes from the Scripting index 'R Get Graphics'

Names Default To Here( 1 );
R Init();
R Submit( "plot(1:10)" );
plot = R Get Graphics( png );
New Window( "Plot", Picture Box( plot ) );
R Term();

View solution in original post

3 REPLIES 3

Re: R-plot though JSL/JMP

I believe what you are seeing is plot 2 immediately replaces plot 1 as you have no intervening Wait() or code to capture the image or display the image in a new JMP window.  In running R's plot() you are getting an R window not a JMP window, so when you run the second plot command it's overwriting the first plot.  From the link you referenced, see the section on R Get Graphics().

 

Try something like

...
R Submit("print(plot1)");
New Window("Plot 1", Picture Box( R Get Graphics(png) ) );
R Submit("print(plot2)");
New Window("Plot 2", Picture Box( R Get Graphics(png) ) );
...

Have you looked at the examples in JMP's scripting index, that is located under the Help menu.  The script below comes from the Scripting index 'R Get Graphics'

Names Default To Here( 1 );
R Init();
R Submit( "plot(1:10)" );
plot = R Get Graphics( png );
New Window( "Plot", Picture Box( plot ) );
R Term();

Re: R-plot though JSL/JMP

Hi Paul Thank you for your answer. I am trying to repeat the same process just for Python instead of R.

And the JSL keep loading the last defined plot from Python instead of plotting the correct figure.

The plt.show(plt.figure(plot1)) works in Python but when I use the code below in JSL:
plot1 = Picture Box(Python Get Graphics("png","plt.show(plt.figure(plot1)"));

Then JSL keep takeing the last defined plot.

 

Do you have a suggestion of what I wo wrong?

Re: R-plot though JSL/JMP

First, from the documentation in the Scripting Index,  Syntax: image = Python Get Graphics( format );

There is no second parameter.  The scripting index description states: Returns the last graphics object written to the Python graph display window in a graphics format specified by the format parameter.

 

Second, You must be using JMP prior to JMP 18.

Python Get Graphics(png); was deprecated in 18, and already removed from JMP 19 development builds.  In JMP 18 it does not return a value, but instead raises an Alert dialog. The appropriate way which will across all versions of JMP, is to have the Python code save the image to a file. Then Open() the file and hand that off off to a JSL Picture Box().  JMP 18's scripting index for Python Get Graphics() gives a complete example of the workaround.  

Instead of doing a plt.show()

you should do:

# save image to location of your choosing 
plt.savefig( jmp.TEMP + 'get_graphics_img.png') # JMP 18+

# or ... savefig( '/tmp/get_graphics_img.png')  before JMP 18 (macOS).

 Then from JSL:  or via jmp.run_jsl(''' ... '''') from Python 

// plot = Python Get Graphics( png );       // DEPRECATED
pngJMP = New Window( "Plot", Picture Box( Open( "$TEMP/get_graphics_img.png", png ) ) );
Python Submit( "plt.close()" );
rc = Delete File( "$TEMP/get_graphics_img.png" );

There is another issue.  Especially if running on the Mac, matplotlib and JMP fight for control over the window event loop if matplotlib is brought up interactively.  You can get an exit of JMP by closing the last matplotlib window visible on screen.  This depends on the matplotlib backend, but it's especially finicky on macOS.