cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Neo
Neo
Level VI

Concatenate data table column entry with default chart title

I am a new user of JMP and have enjoyed its capabilities so far (coming from Matlab)

I want to include an entry from one of my data table columns within the chart title, concatenated with the default chart title as

(this particular entry is same for all rows within its column, its the sample ID). 

Default chart title  [sample ID]

 

How to do this in the script?

 

Also, I would like know if I can use custom text within the chart (example the text command from Matlab)?

 

Thanks

When it's too good to be true, it's neither
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Concatenate data table column entry with default chart title

Here is a very simple example of adding the features you want.  If you interactively make the changes you want, you can then have JMP give you the script to reproduce the the chart, and it will give you the JSL required to make the changes

middle.PNG

Here is the JSL

Names Default To Here( 1 );

// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );
// Report snapshot: Big Class - Fit Y by X of height by weight
biv = Data Table( "Big Class" ) <<
Bivariate( Y( :height ), X( :weight ) );

// Add some text on the graph.  A complete baseline graphics
// environment (Much like the Mathworks environment) is available
// in JMP	
Report( biv )[FrameBox( 1 )] <<
Add Graphics Script(
	Text( Center Justified, {120, 62}, "MIDDLE" )
);

// Change the title of the outline box for the chart
// This simple example adds the value from row 1 of
// the Sex column
report(biv)[OutlineBox(1)] << set title(
	char(report(biv)[OutlineBox(1)] << get title)
 || " " || :sex[1] );

I suggest you take the time to read the Discovering JMP document under the Help pulldown menu, along with the Essential Graphing document, which is available in the JMP Documentation Library under the Help pull down menu 

Jim

View solution in original post

1 REPLY 1
txnelson
Super User

Re: Concatenate data table column entry with default chart title

Here is a very simple example of adding the features you want.  If you interactively make the changes you want, you can then have JMP give you the script to reproduce the the chart, and it will give you the JSL required to make the changes

middle.PNG

Here is the JSL

Names Default To Here( 1 );

// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );
// Report snapshot: Big Class - Fit Y by X of height by weight
biv = Data Table( "Big Class" ) <<
Bivariate( Y( :height ), X( :weight ) );

// Add some text on the graph.  A complete baseline graphics
// environment (Much like the Mathworks environment) is available
// in JMP	
Report( biv )[FrameBox( 1 )] <<
Add Graphics Script(
	Text( Center Justified, {120, 62}, "MIDDLE" )
);

// Change the title of the outline box for the chart
// This simple example adds the value from row 1 of
// the Sex column
report(biv)[OutlineBox(1)] << set title(
	char(report(biv)[OutlineBox(1)] << get title)
 || " " || :sex[1] );

I suggest you take the time to read the Discovering JMP document under the Help pulldown menu, along with the Essential Graphing document, which is available in the JMP Documentation Library under the Help pull down menu 

Jim