Good morning
i would like to script this JMP function "make table of graphs like this" , order to save my picture directly into the associated JMP table.
someone can help me
This example does the work one-at-a-time because it looks like you might have some specific requirements about what data you want to keep.
dt = Open( "$sample_data/big class.jmp" ); picDt = New Table( "dist pics", New Column( "pics", Expression, "None", Set Values( {} ),Set Display Width( 250 ) ) ); ages = {14, 16, 17}; For( j = 1, j <= N Items( ages ), j++, dt << Select Where( dt:age == ages[j] ); subsetDt = dt << subset( output table name( Char( ages[j] ) ) ); dist = subsetDt << Distribution( Continuous Distribution( Column( subsetDt:weight ), Quantiles( 0 ), Summary Statistics( 0 ), Outlier Box Plot( 0 ) ) ); pic = (Report( dist )[Outline Box( "weight" )]) << getpicture; dist << closewindow(); Close( subsetDt, "nosave" ); picDt << addrows( 1 ); picDt:pics[j] = pic; ); picDt<<Set Cell Height( 100 );
Three distribution pictures in a table
Use JSL variables to keep track of the tables: dt, subsetDt, picDt. JSL often needs you to be specific about the table when there is more than one being used.
in oder to better undrstand the issue. i report part of my script:
// the entire loop scan a table and for each subchart create graph// For( j = 1, j <= N Items( chart_title ), j++, selectDT[1] << Select Where( :SPC_Chart == chart_title[j] ); display = selectDT[1] << subset( output table name( chart_title[j] ) ); display( j ) << Get name; test_CTRL; // this is an expression that make some graphs );
so, i would like caputure the graph created by test_CTRL and save it in a data table using make table of graphs like this
/*New Table( "Chart", Add Rows( 1 ), New Column( "P", Expression, "None", Set Values( {New Image( Char To Blob( a ), "png" )} ) ), New Column( "Y", Character, "Nominal", Set Values( chart_title[j] ) ) )*/ );