Subscribe Bookmark RSS Feed

How to append two box plots to same box?

Hi Guys,

I am trying to generate two box plots as follows:

14 REPLIES
mpb

Super User

Joined:

Jun 23, 2011

Is this what you are trying to do? (Script assumes the Fitness data is current).



P259 of the JMP Scripting Guide has a slightly more complicated example which illustrates this kind of thing. I jogged my own memory by doing the Oneway of Oxy and MaxPulse via a single Fit Model and saved all objects which resulted in a script where the 2 plots were joined with an H List Box. I changed the H List Box to a V List Box, inserted the Textbox (though it may be superfluous) and changed the window title to read "Box Plots".

If you want to change the titles of the individual box plots, make the changes manually on the output and save script for all objects (you will lose the textbox). The result will show you the syntax needed.
Ok that worked.

Thanks a lot!!
Jeff_Perkinson

Community Manager

Joined:

Jun 23, 2011

Here's another example that uses something close to what you tried originally.

-Jeff
Thanks, Jeff that worked too. Glad to know that I was on the right track.

How do I save this script to the table so that both the box plots appear on the same window?

I can save each individual box plot to a different window when I use the Save Script to Data table option.
ms

Super User

Joined:

Jun 23, 2011

I guess you just have to choose "New Property/Script" (under the upper red triangle in the left side field) and then paste your script in the dialog.

It can be edited later by right clicking the script and choose "Edit".
Thanks.

Now how do I add a reference line to the Y axis of the box plots?

I was using something like:

mpb

Super User

Joined:

Jun 23, 2011

1. Run the script without your attempt to add a reference line.
2. In the output add the reference line(s) manually.
3. Save Script to Script Window
4. Note how the resulting script has implemented the reference lines
5. Modify your original script accordingly

OR...

If you read (very!) carefully the discussion of Oneway on page 196 of the Scripting Guide, you might be tempted to try something like (using the Fitness data):


where everything after the "50" is optional.

Oddly, even though the latter is, for me, a little easier to assimilate, it turns out (at least for me) that when you run that last code and then, from the output, save the script, the newly generated script *omits* the Yaxis modification!! This makes the former approach a little more appealing to me.
Damn I should have thought of that :)

Thanks for your help.

Ok now I have this:




I want to get the 121 and the 105 values from a list because I am plotting multiple box plots for different sets of data and want different reference lines for each.

Say I am plotting 10 box plots each of which have two different reference lines, how can I get the number for the reference line from a list and add it to it's box plot?

Thanks again for your help.
mpb

Super User

Joined:

Jun 23, 2011

Example using the Fitness Data: