다양한 스크립트로 여러 그래프 내보내기안녕하세요 Jmp 사용자 여러분,
Jmp에서 여러 그래프를 내보내려고 합니다. 해당 스크립트를 선택하고 모든 그래프를 함께 내보낼 방법이 있나요?
정말 감사합니다 !
I
자동화 및 스크립팅대량 맞춤형Re: 다른 스크립트로 여러 그래프 내보내기오후 로즈,
"그래프"를 열려고 하면 여전히 빈 창이 나타납니다. 포함해야 할 근본적인 것이 있습니까? 내 목표는 세 개의 플롯(Graphs, Graphs2 및 Graphs3)을 하나의 창에 모두 넣어 Powerpoint에 복사하여 붙여넣을 수 있도록 하는 것입니다.
입력해 주셔서 감사합니다.
닐
Re: 다른 스크립트로 여러 그래프 내보내기오후 로즈,
입력해 주셔서 감사합니다! 초보자인 저는 여전히 JSL 흐름과 기능에 익숙해지고 있으며 전문가의 안내를 받으면 기쁠 것입니다. 전체적인 흐름을 보여드리기 위해 전체 스크립트를 포함시켰습니다. 기본 매크로 및 서브루틴을 고려한 이전 코딩 경험을 기반으로 루틴을 식으로 캡슐화하여 나중에 프로그램에서 호출할 수 있도록 했습니다("Files()", "Join_files" 및 "Con").
"Graphs = Eval Expr"을 "Graphs = Expr"로 변경했는데 모든 것이 작동합니다. 다른 표현식(Join_files)에서 호출되었기 때문에 Eval이 필요한지 확신할 수 없었습니다.
새 창에서 그래프를 사용했지만 여전히 빈 창이 나타납니다.
소중한 시간 내주셔서 다시 한 번 감사드립니다.
닐
Files = Expr(
SD1 = "C:\Users\";
path = {};
f1 = Files In Directory( SD1, recursive(1));
For( i = 1, i <= N Items( f1 ), i++,
If(Ends With( f1[i], ".csv" ),
f1[i] = Convert File Path(SD1) || f1[i];
b= f1[i];
Insert Into(path, b)
);
);
);
Join_files = Expr(
For( i = 1, i <= N Items( path ), i+=2,
/*area, %area, and pore pixel count*/
jointable1 = Open( path[i] );
//jointable1 << Get Name;
samplename = Substr( jointable1 << Get Name, 1, 18 ); //sample replicate name //
samplename2 = Word(1,q, "_"); // only sample name, no replicate suffix
jointable1 << New Column( "Sample",
Character,
Nominal,
Set Each Value( samplename ) // setting each row in column 1 to samp rep name //
);
jointable2 = Open( path[i + 1] );
dt = Data Table( jointable1 ) << Join(
With( Data Table( jointable2 ) ),
Select( :Sample, :Area, :Name( "%Area" ),:scale,:thick),
SelectWith( :pixD1, :count1),
Cartesian Join
);
Close( jointable1, no save );
Close( jointable2, no save );
Columns();
Graphs();
Graphs2();
Graphs3();
dt << Set Name(samplename);
po = dt << get name;
dt << Save(SD1 || po);
);
nw = new window("Example Export Multiple Platforms",
chart_output = vlistbox(
graphs,
);
);
);
Columns = Eval Expr(
dt << New Column( "Sample 2",
Character,
"Nominal",
Set Each Value(samplename2),
Set Display Width( 150 ),
);
);
Graphs = Eval Expr(
/*set graphs*/
dt << New Table Property( "Cumulative Resistivity",
Graph Builder(
Size( 591, 496 ),
Show Control Panel( 0 ),
Grid Color( "Black" ),
Graph Spacing( 2 ),
Variables(
X( :Name( "Diameter (um)" ) ),
Y( :Name( "flow resistivity (Pa*s/m^2)") ),
Overlay( :Sample )
),
Elements( Position( 1, 1 ), Line( X, Y, Legend( 20 ) ) ),
SendToReport(
Dispatch(
{},
"Diameter (um)",
ScaleBox,
{Min( 0 ), Max( 80 ), Inc( 1 ), Minor Ticks( 1 ),
Label Row(
{Show Major Grid( 1 ), Show Minor Grid( 1 )}
)}
),
Dispatch(
{},
"flow resistivity (Pa*s/m^2)",
ScaleBox,
{Scale( "Log" ), Format( "Scientific", 12 ), Min( 100000 ),
Max( 10000000000000 ), Inc( 1 ), Minor Ticks( 1 ),
Label Row( {Show Major Grid( 1 ), Show Minor Grid( 1 )} )}
),
)
)
)
);
Con = Expr(
dt = {};
// Sort list ascending (sample replicates) //
For( i = 1, i <= N Table(), i++,
table = data table(i);
insert into(dt, table);
sort list into(dt)
);
// Concatenate each file (sample replicates) //
dt_all= Data Table( dt[1] ) << Concatenate(
Data Table( dt[2] ),
Data Table( dt[3] ),
Output Table( "Concatenated Table" )
);
// Rename file to sample name and Save //
dt_all << set name(samplename2);
dt_all:Sample << Set Display Width( 150 ); // Widen to include entire title
p = dt_all << get name;
dt_all << Save(SD1 || p);
close(dt_all, no save);
close(dt[1], no save);
close(dt[2], no save);
close(dt[3], no save);
);
Files();
Join_files();
Con();
Re: 다른 스크립트로 여러 그래프 내보내기안녕하세요 NRW - 제 생각에는 당신이 일을 다소 복잡하게 만드는 것 같습니다.조인 논리를 표현식에 넣을 필요가 없습니다.주변 expr() 없이 있는 그대로 실행하십시오.
그만큼 그래프 게시물에서 논리가 잘렸지만 그렇게 할 것입니다 특급() , 보다는 평가판() .
마지막으로 새 창에 그냥 넣어
graphs,
그리고 아니다
graphs("Cumulative Resistivity"),
Re: 다른 스크립트로 여러 그래프 내보내기여러분,
나는 방금 이 스레드를 우연히 발견했고 그것이 내가 추구했던 것이라고 생각합니다. 그러나 나는 여전히 JSL 학습 고비를 극복하려고 노력하고 있으며 결과를 얻을 수 없습니다.
빠른 요약:
- CSV 데이터 세트를 하나의 JMP 시트로 병합
- 플롯 스크립트를 생성하여 데이터 테이블에 저장
- 나중에 테이블을 열 때 세 개의 플롯 스크립트를 실행한 다음 각 플롯을 하나의 파워포인트 슬라이드에 복사하여 붙여넣습니다(플롯에 해당하는 이미지는 이미 같은 슬라이드에 붙여넣었습니다)
적어도 세 그래프를 모두 풀링하고 세 그래프를 동시에 내보낼 수 있는 형식으로 가져옴으로써 클릭 및 복사 단계를 최소화하려고 합니다. 어떻게든 그룹화하고 끌어올 수 있는 파일로 저장하는 대시보드 또는 저널을 사용하여 이 작업을 수행해야 하는지 살펴보았습니다. 성배는 내 jpg 이미지를 내 JMP 플롯과 결합한 다음 PP로 가져오는 것입니다.
나는 Vlist 명령을 시도했다 그러나 빈 창을 얻을 스크립트로 저장된 플롯을 얻으려고 할 때. 관련 스크립트 조각의 일부가 표시됩니다.
어떤 생각이나 의견도 환영합니다.
닐
Join_files = Expr(
For( i = 1, i <= N Items( path ), i+=2,
/*area, %area, and pore pixel count*/
jointable1 = Open( path[i] );
//jointable1 << Get Name;
samplename = Substr( jointable1 << Get Name, 1, 18 ); //sample replicate name //
samplename2 = Word(1,q, "_"); // only sample name, no replicate suffix
jointable1 << New Column( "Sample",
Character,
Nominal,
Set Each Value( samplename ) // setting each row in column 1 to samp rep name //
);
/*diameter and pore pixel count*/
jointable2 = Open( path[i + 1] );
dt = Data Table( jointable1 ) << Join(
With( Data Table( jointable2 ) ),
Select( :Sample, :Area, :Name( "%Area" ),:scale,:thick),
SelectWith( :pixD1, :count1),
Cartesian Join
);
Close( jointable1, no save );<SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="report summ_.JPG" style="width: 829px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="report summ_.JPG" style="width: 829px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="report summ_.JPG" style="width: 829px;"><span class="lia-inline-image-display-wrapper" image-alt="report summ_.JPG" style="width: 829px;"><img src="https://us.v-cdn.net/6038925/uploads/images/32980i018D050D35ACCDD9/report%20summ_.JPG" role="button" title="report summ_.JPG" alt="report summ_.JPG" /></span></SPAN></SPAN></SPAN>
Close( jointable2, no save );
Columns();
Graphs();
Graphs2();
Graphs3();
dt << Set Name(samplename);
po = dt << get name;
dt << Save(SD1 || po);
);
<BR />Graphs = Eval Expr(<BR />/*set graphs*/<BR />dt << New Table Property( "Cumulative Resistivity",<BR />Graph Builder(<BR />Size( 591, 496 ),<BR />Show Control Panel( 0 ),<BR />Grid Color( "Black" ),<BR />Graph Spacing( 2 ),<BR />Variables(<BR />X( :Name( "Pore Diameter (um)" ) ),<BR />Y( :Name( "Cumulative flow resistivity (Pa*s/m^2)") ),<BR />Y( :Pore Size Dist ),<BR />Y( :Name( "Cumulative Pore fraction (pore+solid)" ) ),<BR />Overlay( :Sample )<BR />),<BR />Elements( Position( 1, 1 ), Line( X, Y, Legend( 20 ) ) ),<BR />Elements( Position( 1, 2 ), Line( X, Y, Legend( 18 ) ) ),<BR />Elements( Position( 1, 3 ), Line( X, Y, Legend( 19 ) ) ),<BR />SendToReport(<BR />Dispatch(<BR />...<BR />
nw = new window("Example Export Multiple Platforms",
chart_output = vlistbox(
graphs("Cumulative Resistivity"),
);
);
);
Re: 다른 스크립트로 여러 그래프 내보내기안녕 @JMP발견자 ,
나는 비슷한 해결책을 내놓았습니다. @pmroz , 그리고 나는 그들이 한 일을 좋아합니다.
이렇게 생각했는데 워드 문서 등을 만드는 것만큼 좋지는 않습니다. PPT 파일로도 바로 저장할 수 있습니다. 보고서를 편리하게 사용하기 위해 JSL에 보고서를 만들었지만 이미 보고서를 열었다면 for 루프가 작동할 수 있습니다. 그러나 보고서를 생성하는 스크립트를 작성하면 창 목록을 찾는 대신 변수 이름으로 보고서를 참조할 수 있습니다.
Names Default To Here( 1 );
dt = open("$sample_data\Big Class.jmp");
rpt1 = dt << Bivariate( Y( :weight ), X( :height ) );
rpt2 = dt << Oneway( Y( :height ), X( :age ), X Axis Proportional( 0 ) );
rpt3 = dt << Fit Group(
Oneway( Y( :weight ), X( :age ), X Axis Proportional( 0 ) ),
Bivariate( Y( :weight ), X( :height ) ),
<<{Arrange in Rows( 2 )}
);
reportlist = {};
For( i = 0, i <= N Items( Window() ), i++,
If(
!Is Missing( Regex( Window( i ) << getwindow title, "Fit" ) ) == 1 | !Is Missing(
Regex( Window( i ) << getwindow title, "Oneway" )
) == 1 | !Is Missing( Regex( Window( i ) << getwindow title, "Bivariate" ) ) == 1,
Insert Into( reportlist, Window( i ) << get window title )
)
);
For( i = 1, i <= N Items( reportlist ), i++,
picbox = Window( reportlist[i] ) << getPicture;
picbox << SaveImage(
"whatever your local directory to save is\pic" || Char( i ) || ".png"
);
);이것들은 당신이 당신의 방식대로 잘 작동하도록 할 것입니다.
행운을 빌어요!,
DS
Re: 다른 스크립트로 여러 그래프 내보내기다음은 Big Class에서 단어 문서로 세 개의 그래픽 출력을 내보내는 예입니다.
dt = open("$sample_data\Big Class.jmp");
dist = expr(dt << Distribution(
Continuous Distribution( Column( :weight ) ),
Nominal Distribution( Column( :age ) )
));
gb1 = expr(dt << Graph Builder(
Show Control Panel( 0 ),
Variables( X( :age ), Y( :sex ) ),
Elements( Heatmap( X, Y, Legend( 2 ) ) )
));
gb2 = expr(dt << Graph Builder(
Show Control Panel( 0 ),
Variables( X( :height ), Y( :weight ), Overlay( :sex ) ),
Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) )
));
nw = new window("Example Export Multiple Platforms",
chart_output = vlistbox(
dist,
page break box(),
gb1,
page break box(),
gb2
);
);
chart_output << save msword("c:\temp\SampleCharts.doc", Native);