Subscribe Bookmark RSS Feed

Graph managing script

Hi I have the folowing script:
Oneway(
Y( :YValue ), X( :XValue ), Histograms( 1 ),
SendToReport(
Dispatch( {}, "Oneway", FrameBox(1), Frame Size(100, 200)),
Dispatch( {}, "Oneway", FrameBox(2), Frame Size(100, 200)),
Dispatch( {}, "Oneway", FrameBox(3), Frame Size(100, 200)),
)
);
I need to do similar analysis when the number of controlled boxes is generated by the user.
Somthing like this:

Oneway(
Y( :Exit Voltage ), X( :DCOffset ),
Histograms( 1 ),
SendToReport(
for(i=1 i=3, i++,
Dispatch( {}, "Oneway", FrameBox(i), Frame Size(100, 200)))));

How can I do it ?

Message was edited by: Evgy
9 REPLIES
1

Message was edited by: Evgy
mpb

Super User

Joined:

Jun 23, 2011

I can't tell from your code what effect you are trying to achieve. Can you describe what the output you want would look like?
I want to make a “Oneway” chart with Histograms enabled.
On this chart I want to control the width of all the received histograms.

The solution is simple if I know the number of histograms (see first code example – 3 histograms).

But the number of histograms is the amount of X values which is given by the user.
Therefore I need to enable width setting for an amount of histograms given by the user.
The second code example is the way I wanted to implement it - to make a loop on the dispatch windows, but this isn't the way.

Thank you in advence.
ms

Super User

Joined:

Jun 23, 2011

This was a tricky one. At first. As the for-loop inside the SendToReport was not working, I tried to use expressions and conditional substitutions of the number of resize commands. However I did not manage because of difficulties to get it right with the quoted "Oneway" inside the arguments and the parse() command as a method for unquoting seem not to work well on partial expressions. It probably possible but I gave up.

However the below approach seem to work (you can skip the first part).
Well, this seems correct, but for some reason it doesn't work...
To be more exact - the script works but it doesn't change the size of the histogrms.
Could you recheck if it works on other frame sizes?
I have JMP 7.0.2, and you ?
ms

Super User

Joined:

Jun 23, 2011

It works for me with every frame size I have tried.

I run JMP 8.0.2 on Macintosh. Maybe something's changed.

Does "r << show tree structure" work in JMP 7? Try that and see if the names of the Histogram boxes correspond to FrameBox(2) etc. But since your first example worked for you I guess they do.
mpb

Super User

Joined:

Jun 23, 2011

Following MS I tried this on 7.0.1 with the Fitness data current and it produced narrow frames for the histograms.

ms

Super User

Joined:

Jun 23, 2011

Off topic to mpb: Nice way to use the summarize command. I'll try to remember that.
Nice, the script is working!!

Thanks all.

P.S - in the script the loop is till n+1 and not n