Is it possible to copy the current Graph Builder plot to the system clipboard using jsl? If so, how?
Hi @BHarris,,
Sure, you'll need to navigate down the display tree to get to the GraphBuilderBox:
Window(1)[GraphBuilderBox(1)] << Copy Picture();
Here is one quick and easy way......using the Big Class data table.
names default to here(1);
dt=current data table();
gb = Graph Builder(
Variables( X( :weight ), Y( :height ) ),
Elements( Points( X, Y, Legend( 6 ) ), Smoother( X, Y, Legend( 7 ) ) )
);
gb<<journal;
I must be seeing things......I would swear I read "copy to a journal"...….sorry for misleading you
Hi @BHarris,
I believe the following jsl can do what you want:
Window(1) << Copy Picture();
Window(1) will point to the last active window (note: not currently active, 0 would point to the script window), and << Copy Picture() will place an image of that report's display box into the system clipboard. I don't usually like referencing things in this manner and a better practice would be to work with the handle from the platform if you have it, as in the scripting index for Copy Picture():
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = dt << Bivariate( y( :weight ), x( :height ) );
rbiv = biv << report;
rbiv << Copy Picture();
I hope this helps!
There are issues with the cutting off of such copies. You can search the Discussion Community for the details, but I believe there is an issue with systems using multiple monitors....and Mac may also be an issue too.
Concerning your " sorcery" statement. The ins and outs of Display Trees, which are a major component in working with JMP output, is all documented in the Scripting Guide. Reading and understanding how this works opens the window(pun intended) to being able to understand and manipulate JMP in all kinds of ways.