Scripting Guide > Extending JMP > JMP Live and JMP Public > Example of Publishing Content to JMP Live
发布日期: 08/07/2020

Example of Publishing Content to JMP Live

This example shows how to save a bivariate analysis as a report and publish the report to JMP Live.

publishUrl = "https://live.company.com:3501";
username = "xyz@jmp.com";
password = "test";
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Color by Column( :sex );
 
rpt = dt << Bivariate(
	Y( :weight ),
	X( :height ),
	Automatic Recalc( 1 ),
	Fit Line( {Line Color( {213, 72, 87} )} ),
	Local Data Filter( Add Filter( columns( :sex ) ) )
);
 
webrpt = New Web Report();
// the title that appears above the graph and on the browser tab
webrpt << Add Report( rpt, Title( "Big Class Bivariate" ), Description( "My test" ) );
url = webrpt << Publish( URL( publishUrl ), API Key( APIkey ), Username( username ), Password( password ), public( 1 ) ); // public report
 
If( webrpt << IsSuccessful,
	Web( url ),
	Write( "\!nPublish failed: ", webrpt << Get Status Message )
);
 
rpt << Close Window();
Close( dt, NoSave );
需要更多信息?有问题?从 JMP 用户社区得到解答 (community.jmp.com).