How do I copy the current Graph Builder plot to the clipboard using jsl?Is it possible to copy the current Graph Builder plot to the system clipboard using jsl? If so, how?
Advanced Statistical ModelingAutomation and ScriptingMass CustomizationRe: How do I copy the current Graph Builder plot to the clipboard using jsl?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.
Re: How do I copy the current Graph Builder plot to the clipboard using jsl?Wow, that's some impressive sorcery! That worked!
Curiously, the x-axis label is mostly cut off in the copy, I wonder why that would be? I tried shrinking the font and that made it worse. Mac JMP v14.2.Re: How do I copy the current Graph Builder plot to the clipboard using jsl?Hi @BHarris,,
Sure, you'll need to navigate down the display tree to get to the GraphBuilderBox:
Window(1)[GraphBuilderBox(1)] << Copy Picture();
@julian
Re: How do I copy the current Graph Builder plot to the clipboard using jsl?This is very close!! It copies the entire window contents, which includes the local data filter, the "Graph Builder" gray box, etc. Is there any way to just get the plot itself?Re: How do I copy the current Graph Builder plot to the clipboard using jsl?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!
@julian
Re: How do I copy the current Graph Builder plot to the clipboard using jsl?I must be seeing things......I would swear I read "copy to a journal"...….sorry for misleading you
Re: How do I copy the current Graph Builder plot to the clipboard using jsl?Hm -- that creates a Graph Builder window then pushes it to the Journal, without affecting the clipboard.
I need to take an *already existing* Graph Builder window and copy the graph to the clipboard.Re: How do I copy the current Graph Builder plot to the clipboard using jsl?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></JOURNAL>