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%3E%E9%80%8F%E9%81%8E%20JSL%2FJMP%20%E7%B9%AA%E8%A3%BD%20R%20%E7%B9%AA%E5%9C%96%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-803149%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%88%91%E6%9C%89%E9%80%99%E5%80%8B%E8%85%B3%E6%9C%AC%EF%BC%8C%E5%A6%82%E4%B8%8B%E6%89%80%E7%A4%BA%EF%BC%8C%E6%88%91%E5%9C%A8%20R%20%E4%B8%AD%E8%A8%88%E7%AE%97%E4%BA%86%E4%B8%80%E4%BA%9B%E7%B0%A1%E5%96%AE%E7%9A%84%E5%85%A7%E5%AE%B9%EF%BC%8C%E6%88%91%E6%83%B3%E5%9C%A8%20JSL%20%E4%B8%AD%E6%9F%A5%E7%9C%8B%E4%B8%80%E4%BA%9B%E5%9C%96%E3%80%82%E6%88%91%E7%84%A1%E6%B3%95%E8%AE%93%20JSL%20%E9%A1%AF%E7%A4%BA%E9%80%99%E5%85%A9%E5%BC%B5%E5%9C%96%E3%80%82%E7%95%B6%E6%88%91%E9%81%8B%E8%A1%8C%E4%B8%8B%E9%9D%A2%E7%9A%84%E7%A8%8B%E5%BC%8F%E7%A2%BC%E6%99%82%EF%BC%8C%E5%AE%83%E6%9C%83%E9%97%9C%E9%96%89%E5%9C%96%201%20%E4%B8%A6%E5%83%85%E9%A1%AF%E7%A4%BA%E5%9C%96%202%E3%80%82%E6%88%91%E5%98%97%E8%A9%A6%E4%BD%BF%E7%94%A8%E6%AD%A4%E8%99%95%E6%8F%8F%E8%BF%B0%E7%9A%84%E5%85%A7%E5%AE%B9%EF%BC%88%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%EF%BC%89%EF%BC%8C%E4%BD%86%E6%88%91%E4%B8%8D%E8%83%BD%E8%AE%93%E5%AE%83%E7%99%BC%E6%8F%AE%E4%BD%9C%E7%94%A8%E3%80%82%E9%80%99%E5%8F%AF%E8%83%BD%E6%98%AF%E5%80%8B%E7%B0%A1%E5%96%AE%E7%9A%84%E6%8C%87%E4%BB%A4%EF%BC%8C%E4%BD%86%E6%88%91%E5%B0%8D%20JSL%20%E9%82%84%E5%BE%88%E9%99%8C%E7%94%9F%E3%80%82%E6%88%91%E5%B8%8C%E6%9C%9B%E4%BD%A0%E8%83%BD%E5%B9%AB%E5%BF%99%E3%80%82%E5%83%85%E4%BE%9B%E5%8F%83%E8%80%83%EF%BC%8C%E6%88%91%E4%BD%BF%E7%94%A8%20JMP%2017.2%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%E5%90%8D%E7%A8%B1%E9%A0%90%E8%A8%AD%E7%82%BA%E6%AD%A4%E8%99%95(1)%EF%BC%9B%3C%2FP%3E%3CP%3E%E5%8C%85%E5%90%AB%EF%BC%88%E2%80%9CDialog_script.jsl%E2%80%9D%EF%BC%89%EF%BC%9B%20%2F%2F%20%E8%BC%89%E5%85%A5%E5%B0%8D%E8%A9%B1%E6%96%B9%E5%A1%8A%E4%BB%A5%E5%8F%96%E5%BE%97%E9%81%B8%E5%AE%9A%E7%9A%84%20X%20%E5%92%8C%20Y%20%E5%88%97%3CBR%20%2F%3Edt%20%3D%20%E7%95%B6%E5%89%8D%E8%B3%87%E6%96%99%E8%A1%A8()%3B%20%2F%2F%20%E5%8F%96%E5%BE%97%E7%9B%AE%E5%89%8D%E8%B3%87%E6%96%99%E8%A1%A8%3C%2FP%3E%3CP%3E%2F%2F%20%E5%BE%9E%E8%B3%87%E6%96%99%E8%A1%A8%E4%B8%AD%E5%8F%96%E5%BE%97%E9%81%B8%E5%AE%9A%E7%9A%84X%E5%92%8CY%E5%88%97%3CBR%20%2F%3ExCol%20%3D%20%E5%88%97(dt%2C%20xColName%5B1%5D)%3B%3CBR%20%2F%3E%20yCol%20%3D%20%E5%88%97(dt%2C%20yColName%5B1%5D)%3B%3C%2FP%3E%3CP%3E%2F%2F%20%E6%AA%A2%E6%9F%A5%E5%88%97%E6%98%AF%E5%90%A6%E5%AD%98%E5%9C%A8%3CBR%20%2F%3E%E5%A6%82%E6%9E%9C%EF%BC%88xCol%20%3D%3D%20%E7%A9%BA%EF%BC%88%EF%BC%89%20%7C%20yCol%20%3D%3D%20%E7%A9%BA%EF%BC%88%EF%BC%89%EF%BC%8C%3CBR%20%2F%3E%20Throw(%22%E9%8C%AF%E8%AA%A4%EF%BC%9A%E8%B3%87%E6%96%99%E8%A1%A8%E4%B8%AD%E4%B8%8D%E5%AD%98%E5%9C%A8%E6%89%80%E9%81%B8%E5%88%97%E3%80%82%22)%3B%3CBR%20%2F%3E%20%EF%BC%89%EF%BC%9B%3C%2FP%3E%3CP%3E%2F%2F%20%E5%BE%9E%20xCol%20%E5%92%8C%20yCol%20%E4%B8%AD%E6%8F%90%E5%8F%96%E5%80%BC%3CBR%20%2F%3ExValues%20%3D%20xCol%20%26lt%3B%26lt%3B%20%E5%8F%96%E5%BE%97%E5%80%BC%EF%BC%9B%20%2F%2F%20%E5%8F%96%E5%BE%97xCol%E7%9A%84%E5%80%BC%3CBR%20%2F%3EyValues%20%3D%20yCol%20%26lt%3B%26lt%3B%20%E5%8F%96%E5%BE%97%E5%80%BC%EF%BC%9B%20%2F%2F%20%E5%8F%96%E5%BE%97%20yCol%20%E7%9A%84%E5%80%BC%3C%2FP%3E%3CP%3E%2F%2F%20%E9%A1%AF%E7%A4%BA%E5%82%B3%E9%80%81%E5%88%B0%20R%20%E7%9A%84%E5%80%BC%EF%BC%88%E7%94%A8%E6%96%BC%E5%81%B5%E9%8C%AF%EF%BC%89%3CBR%20%2F%3E%E9%A1%AF%E7%A4%BA%EF%BC%88x%E5%80%BC%EF%BC%89%EF%BC%9B%3CBR%20%2F%3E%E9%A1%AF%E7%A4%BA%EF%BC%88y%E5%80%BC%EF%BC%89%EF%BC%9B%3C%2FP%3E%3CP%3E%2F%2F%20%E5%88%9D%E5%A7%8B%E5%8C%96R%E9%80%A3%E6%8E%A5%3CBR%20%2F%3ER%20%E5%88%9D%E5%A7%8B%E5%8C%96%EF%BC%88%EF%BC%89%EF%BC%9B%3C%2FP%3E%3CP%3E%2F%2F%20%E5%B0%87%20xCol%20%E5%92%8C%20yCol%20%E7%9A%84%E5%80%BC%E4%BD%9C%E7%82%BA%E6%95%B8%E5%80%BC%E5%90%91%E9%87%8F%E5%82%B3%E9%80%81%E5%88%B0%20R%3CBR%20%2F%3E%20R%20%E7%99%BC%E9%80%81%EF%BC%88xValues%EF%BC%89%EF%BC%9B%3CBR%20%2F%3E%20R%20%E7%99%BC%E9%80%81(%20yValues%20)%3B%3C%2FP%3E%3CP%3E%2F%2F%20%E5%9F%B7%E8%A1%8C%E5%A4%96%E9%83%A8R%E8%85%B3%E6%9C%AC%3CBR%20%2F%3ER%20%E6%8F%90%E4%BA%A4%E6%96%87%E4%BB%B6(%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%E6%AA%A2%E7%B4%A2%E7%B9%AA%E5%9C%96%3CBR%20%2F%3ER%20%E6%8F%90%E4%BA%A4(%E2%80%9C%E5%88%97%E5%8D%B0(plot1)%E2%80%9D)%3B%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3ER%20%E6%8F%90%E4%BA%A4(%E2%80%9C%E5%88%97%E5%8D%B0(plot2)%E2%80%9D)%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%2F%2F%20%E7%B5%82%E6%AD%A2R%E9%80%A3%E6%8E%A5%3CBR%20%2F%3E%2F%2FR%20%E8%A1%93%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%E5%92%8C%E8%85%B3%E6%9C%AC%E7%B7%A8%E5%AF%AB%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%3CLINGO-LABEL%3E%E8%A6%96%E7%AA%97%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%3E%E5%9B%9E%E8%A6%86%EF%BC%9A%E9%80%8F%E9%81%8E%20JSL%2FJMP%20%E9%80%B2%E8%A1%8C%20R%20%E7%B9%AA%E5%9C%96%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-803263%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%88%91%E7%9B%B8%E4%BF%A1%E6%82%A8%E6%89%80%E7%9C%8B%E5%88%B0%E7%9A%84%E6%98%AF%E5%9C%96%202%20%E7%AB%8B%E5%8D%B3%E6%9B%BF%E6%8F%9B%E4%BA%86%E5%9C%96%201%EF%BC%8C%E5%9B%A0%E7%82%BA%E6%82%A8%E6%B2%92%E6%9C%89%E4%B8%AD%E9%96%93%E7%9A%84%20Wait()%20%E6%88%96%E7%A8%8B%E5%BC%8F%E7%A2%BC%E4%BE%86%E6%93%B7%E5%8F%96%E5%BD%B1%E5%83%8F%E6%88%96%E5%9C%A8%E6%96%B0%E7%9A%84%20JMP%20%E8%A6%96%E7%AA%97%E4%B8%AD%E9%A1%AF%E7%A4%BA%E5%BD%B1%E5%83%8F%E3%80%82%E5%9C%A8%E5%9F%B7%E8%A1%8C%20R%20%E7%9A%84plot()%20%E6%99%82%EF%BC%8C%E6%82%A8%E5%B0%87%E7%8D%B2%E5%BE%97%E4%B8%80%E5%80%8B%20R%20%E7%AA%97%E5%8F%A3%E8%80%8C%E4%B8%8D%E6%98%AF%20JMP%20%E7%AA%97%E5%8F%A3%EF%BC%8C%E5%9B%A0%E6%AD%A4%E7%95%B6%E6%82%A8%E5%9F%B7%E8%A1%8C%E7%AC%AC%E4%BA%8C%E5%80%8B%E7%B9%AA%E5%9C%96%E5%91%BD%E4%BB%A4%E6%99%82%EF%BC%8C%E5%AE%83%E6%9C%83%E8%A6%86%E5%AF%AB%E7%AC%AC%E4%B8%80%E5%80%8B%E7%B9%AA%E5%9C%96%E3%80%82%E5%BE%9E%E6%82%A8%E5%BC%95%E7%94%A8%E7%9A%84%E9%80%A3%E7%B5%90%E4%B8%AD%EF%BC%8C%E8%AB%8B%E5%8F%83%E9%96%B1%20R%20Get%20Graphics()%20%E7%9A%84%E9%83%A8%E5%88%86%E3%80%82%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3E%E5%98%97%E8%A9%A6%E9%A1%9E%E4%BC%BC%E7%9A%84%E6%9D%B1%E8%A5%BF%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%E6%82%A8%E6%98%AF%E5%90%A6%E6%9F%A5%E7%9C%8B%E9%81%8E%20JMP%20%E8%85%B3%E6%9C%AC%E7%B4%A2%E5%BC%95%E4%B8%AD%E7%9A%84%E7%AF%84%E4%BE%8B%EF%BC%8C%E8%A9%B2%E7%B4%A2%E5%BC%95%E4%BD%8D%E6%96%BC%E3%80%8C%E8%AA%AA%E6%98%8E%E3%80%8D%E5%8A%9F%E8%83%BD%E8%A1%A8%E4%B8%8B%E3%80%82%E4%B8%8B%E9%9D%A2%E7%9A%84%E8%85%B3%E6%9C%AC%E4%BE%86%E8%87%AA%E8%85%B3%E6%9C%AC%E7%B4%A2%E5%BC%95%E2%80%9CR%20Get%20Graphics%E2%80%9D%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%3E%E5%9B%9E%E8%A6%86%EF%BC%9A%E9%80%8F%E9%81%8E%20JSL%2FJMP%20%E9%80%B2%E8%A1%8C%20R%20%E7%B9%AA%E5%9C%96%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-804938%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%EF%BC%8C%E4%BF%9D%E7%BE%85%EF%BC%8C%E8%AC%9D%E8%AC%9D%E4%BD%A0%E7%9A%84%E5%9B%9E%E7%AD%94%E3%80%82%E6%88%91%E6%AD%A3%E5%9C%A8%E5%98%97%E8%A9%A6%E7%82%BA%20Python%20%E8%80%8C%E4%B8%8D%E6%98%AF%20R%20%E9%87%8D%E8%A4%87%E7%9B%B8%E5%90%8C%E7%9A%84%E9%81%8E%E7%A8%8B%E3%80%82%3CBR%20%2F%3E%3CBR%20%2F%3E%E4%B8%A6%E4%B8%94%20JSL%20%E4%B8%8D%E6%96%B7%E5%BE%9E%20Python%20%E8%BC%89%E5%85%A5%E6%9C%80%E5%BE%8C%E5%AE%9A%E7%BE%A9%E7%9A%84%E7%B9%AA%E5%9C%96%EF%BC%8C%E8%80%8C%E4%B8%8D%E6%98%AF%E7%B9%AA%E8%A3%BD%E6%AD%A3%E7%A2%BA%E7%9A%84%E5%9C%96%E5%BD%A2%E3%80%82%3CBR%20%2F%3E%3CBR%20%2F%3E%20plt.show(plt.figure(plot1))%20%E5%9C%A8%20Python%20%E4%B8%AD%E5%B7%A5%E4%BD%9C%EF%BC%8C%E4%BD%86%E6%98%AF%E7%95%B6%E6%88%91%E5%9C%A8%20JSL%20%E4%B8%AD%E4%BD%BF%E7%94%A8%E4%BB%A5%E4%B8%8B%E7%A8%8B%E5%BC%8F%E7%A2%BC%E6%99%82%EF%BC%9A%3CBR%20%2F%3E%E5%9C%961%20%3D%20%E5%9C%96%E7%89%87%E6%A1%86(Python%20%E5%8F%96%E5%BE%97%E5%9C%96%E5%BD%A2(%22png%22%2C%22plt.show(plt.figure(plot1)%22))%3B%3C%2FP%3E%3CP%3E%E7%84%B6%E5%BE%8C%20JSL%20%E7%B9%BC%E7%BA%8C%E5%8F%96%E5%BE%97%E6%9C%80%E5%BE%8C%E5%AE%9A%E7%BE%A9%E7%9A%84%E5%9C%96%E3%80%82%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%E4%BD%A0%E5%B0%8D%E6%88%91%E5%81%9A%E9%8C%AF%E4%BA%86%E4%BB%80%E9%BA%BC%E6%9C%89%E4%BB%80%E9%BA%BC%E5%BB%BA%E8%AD%B0%E5%97%8E%EF%BC%9F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-805156%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E8%A6%86%EF%BC%9A%E9%80%8F%E9%81%8E%20JSL%2FJMP%20%E9%80%B2%E8%A1%8C%20R%20%E7%B9%AA%E5%9C%96%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-805156%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E9%A6%96%E5%85%88%EF%BC%8C%E6%A0%B9%E6%93%9A%E8%85%B3%E6%9C%AC%E7%B4%A2%E5%BC%95%E4%B8%AD%E7%9A%84%E6%96%87%E6%AA%94%EF%BC%8C%E8%AA%9E%E6%B3%95%EF%BC%9A%20image%20%3D%20Python%20Get%20Graphics(%20format%20)%3B%3C%2FP%3E%0A%3CP%3E%E6%B2%92%E6%9C%89%E7%AC%AC%E4%BA%8C%E5%80%8B%E5%8F%83%E6%95%B8%E3%80%82%E8%85%B3%E6%9C%AC%E7%B4%A2%E5%BC%95%E6%8F%8F%E8%BF%B0%E6%8C%87%E5%87%BA%EF%BC%9A%3CEM%3E%E4%BB%A5%20format%20%E5%8F%83%E6%95%B8%E6%8C%87%E5%AE%9A%E7%9A%84%E5%9C%96%E5%BD%A2%E6%A0%BC%E5%BC%8F%E5%82%B3%E5%9B%9E%E5%AF%AB%E5%85%A5%20Python%20%E5%9C%96%E5%BD%A2%E9%A1%AF%E7%A4%BA%E8%A6%96%E7%AA%97%E7%9A%84%E6%9C%80%E5%BE%8C%E4%B8%80%E5%80%8B%E5%9C%96%E5%BD%A2%E7%89%A9%E4%BB%B6%E3%80%82%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3E%E5%85%B6%E6%AC%A1%EF%BC%8C%3CSPAN%3E%E6%82%A8%E5%BF%85%E9%A0%88%E5%9C%A8%20JMP%2018%20%E4%B9%8B%E5%89%8D%E4%BD%BF%E7%94%A8%20JMP%E3%80%82%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20face%3D%22inherit%22%3EPython%20%E5%8F%96%E5%BE%97%E5%9C%96%E5%BD%A2(png)%3B%E5%9C%A8%2018%20%E4%B8%AD%E5%B7%B2%E6%A3%84%E7%94%A8%EF%BC%8C%E4%B8%A6%E4%B8%94%E5%B7%B2%E5%BE%9E%20JMP%2019%3C%2FFONT%3E%E9%96%8B%E7%99%BC%3CFONT%20face%3D%22inherit%22%3E%E7%89%88%E6%9C%AC%E4%B8%AD%E5%88%AA%E9%99%A4%E3%80%82%E5%9C%A8%20JMP%2018%20%E4%B8%AD%EF%BC%8C%E5%AE%83%E4%B8%8D%E6%9C%83%E5%82%B3%E5%9B%9E%E5%80%BC%EF%BC%8C%E8%80%8C%E6%98%AF%E5%BC%95%E7%99%BC%E8%AD%A6%E5%A0%B1%E5%B0%8D%E8%A9%B1%E6%A1%86%E3%80%82%E9%81%A9%E7%94%A8%E6%96%BC%E6%89%80%E6%9C%89%E7%89%88%E6%9C%AC%20JMP%20%E7%9A%84%E9%81%A9%E7%95%B6%E6%96%B9%E6%B3%95%E6%98%AF%E8%AE%93%3C%2FFONT%3EPython%20%E7%A8%8B%E5%BC%8F%E7%A2%BC%E5%B0%87%E5%BD%B1%E5%83%8F%E5%84%B2%E5%AD%98%E5%88%B0%E6%AA%94%E6%A1%88%E4%B8%AD%E3%80%82%E7%84%B6%E5%BE%8C%20Open()%20%E8%A9%B2%E6%96%87%E4%BB%B6%E4%B8%A6%E5%B0%87%E5%85%B6%E4%BA%A4%E7%B5%A6%20JSL%20Picture%20Box()%E3%80%82%20JMP%2018%20%E7%9A%84%20Python%20Get%20Graphics()%20%E8%85%B3%E6%9C%AC%E7%B4%A2%E5%BC%95%E6%8F%90%E4%BE%9B%E4%BA%86%E8%A7%A3%E6%B1%BA%E6%96%B9%E6%B3%95%E7%9A%84%E5%AE%8C%E6%95%B4%E7%AF%84%E4%BE%8B%E3%80%82%3C%2FP%3E%0A%3CP%3E%E8%80%8C%E4%B8%8D%E6%98%AF%E5%9F%B7%E8%A1%8C%20plt.show()%3C%2FP%3E%0A%3CP%3E%E4%BD%A0%E6%87%89%E8%A9%B2%E9%80%99%E6%A8%A3%E5%81%9A%EF%BC%9A%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%E7%84%B6%E5%BE%8C%E5%BE%9E%20JSL%EF%BC%9A%3CEM%3E%E6%88%96%E9%80%8F%E9%81%8E%20Python%20%E7%9A%84%20jmp.run_jsl('''%20...%20'''')%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%E9%82%84%E6%9C%89%E4%B8%80%E5%80%8B%E5%95%8F%E9%A1%8C%E3%80%82%E7%89%B9%E5%88%A5%E6%98%AF%E5%9C%A8%20Mac%20%E4%B8%8A%E5%9F%B7%E8%A1%8C%E6%99%82%EF%BC%8C%E5%A6%82%E6%9E%9C%E4%BB%A5%E4%BA%92%E5%8B%95%E6%96%B9%E5%BC%8F%E5%95%9F%E5%8B%95%20matplotlib%EF%BC%8C%E5%89%87%20matplotlib%20%E5%92%8C%20JMP%20%E6%9C%83%E7%88%AD%E5%A5%AA%E5%B0%8D%E8%A6%96%E7%AA%97%E4%BA%8B%E4%BB%B6%E5%BE%AA%E7%92%B0%E7%9A%84%E6%8E%A7%E5%88%B6%E6%AC%8A%E3%80%82%E6%82%A8%E5%8F%AF%E4%BB%A5%E9%80%8F%E9%81%8E%E9%97%9C%E9%96%89%E8%9E%A2%E5%B9%95%E4%B8%8A%E6%9C%80%E5%BE%8C%E4%B8%80%E5%80%8B%E5%8F%AF%E8%A6%8B%E7%9A%84%20matplotlib%20%E8%A6%96%E7%AA%97%E4%BE%86%E9%80%80%E5%87%BA%20JMP%E3%80%82%E9%80%99%E5%8F%96%E6%B1%BA%E6%96%BC%20matplotlib%20%E5%BE%8C%E7%AB%AF%EF%BC%8C%E4%BD%86%E5%AE%83%E5%9C%A8%20macOS%20%E4%B8%8A%E5%B0%A4%E5%85%B6%E6%8C%91%E5%89%94%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.