It do not need to save the local image file first.
Instead, the graph is written directly into a variable as a binary file in PNG format
Thanks!
dt=Open("$SAMPLE_DATA/Big Class.jmp");
p1 = dt << Graph Builder(
Variables( X( :weight ), Y( :height ), Group X( :age ), Color( :sex ) ),
Elements( Bar( X, Y, Legend( 5 ), Response Axis( "X" ) ) )
);