Organize journal in a grid while copying open charts to journal within a loopCurrently my code snippet below copies open charts (distributions and heatmaps) into a journal depending on the occurrence of specific text (e.g. "Distribution") in window name list (postWindowList) of the open charts.
However, the journal gets the chart one below the other in one column. I would like them the charts to be in a MXN grid. How to achieve this from within the loop?
istart = LengthOfpreWindowList + 2; //e.g. istart = 10
iend = LengthOfpostWindowList; //e.g. iend = 24
nw = New Window( "My Report" , <<JOURNAL></JOURNAL>
I am on JMP 13.
GraphicsScriptingWindowsRe: Organize journal in a grid while copying open charts to journal within a loopI believe a better solution for you is to take my script and add @pauldeen suggestion. It will give you the MxN matrix without having to do the hb1,hb2 coding
nw = New Window( "My Report" , <<JOURNAL></JOURNAL>
If you replace the 5 in the NCol() function with the number of columns you want in your output, it will automatically fill in as many rows as necessary to present all of your output.
Re: Organize journal in a grid while copying open charts to journal within a loopThanks, your script changes what I getting by default (i.e. vertically aligned charts in one column) to horizontally aligned charts.
However, I was able to use hlb1, hlb2, and so on (and assigning them appropriately within the for loop) to copy what I wanted in a MxN grid of the journal.
This will do nicely for what I am after at the moment.
Re: Organize journal in a grid while copying open charts to journal within a loopYou should look at a lineup box where you can specify the N part of your M*N list. Then you can just append things to that box and eventually journal the box.
Re: Organize journal in a grid while copying open charts to journal within a loopI believe this will work.
nw = New Window( "My Report" , <<JOURNAL></JOURNAL>
I strongly recommend that you take the time to read the Scripting Guide, found in the JMP Documentation Library, available under the Help pull down menu.!!!