You might, or might not, want to resize it (<<scale below) because it will be scaled to fit later. If you don't resize, the original resolution is available if you want it.
dt=open("$sample_data/big class.jmp");
r = dt<<Graph Builder(
Size( 518, 448 ),
Show Control Panel( 0 ),
Variables( X( :weight ), Y( :height ) ),
Elements( Points( X, Y, Legend( 12 ) ), Smoother( X, Y, Legend( 13 ) ) )
);
myImage = ((r<<report)[FrameBox(1)])<<getpicture;
myImage<<scale(.25);
dtPics = New Table( "pics",
Add Rows( 1 ),
Set Cell Height( 100 ),
New Column( "graphs", Expression, "None", Set Display Width( 150 ) )
);
dtPics:graphs[1] = myImage;
In the example, 'r' is the scriptable report object, not the displaybox tree, You can ask the object for the tree with either r<<report or report(r). Navigating down the tree to Framebox(1) using subscripting finds the first framebox; there are no axes. If you want axes, pick a box higher in the tree that includes them. ShowTreeStructure can be really helpful.
The captured picture is just the framebox.
Edit: still asleep. You had the variable names correct; I should have used 'obj' rather than 'r' because 'r' should be for the report surface which is the display box tree.
Craige