turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- how to plot CDF plot without doing y by x plot

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

May 17, 2016 12:23 PM
(897 views)

hi, Here is an example, using big class data table. In order to get the CDF plot, I have to do a y by x and enable CDF option to get it. My question is how to plot CDF plot without doing y by x plot? I scratched my hair very hard, no vial.

Oneway(

SendToByGroup( Bygroup Default ),

Y( :weight ),

SendToByGroup( {:age == 12}, Y( :weight ) ),

X( :sex ),

SendToByGroup( {:age == 12}, X( :sex ), CDF Plot( 1 ) ),

By( :age ),

SendToByGroup(

{:age == 12},

SendToReport(

Dispatch(

{"Oneway Analysis of weight By sex age=12"},

"CDF Plot",

OutlineBox,

{SetHorizontal( 1 )}

)

)

)

);

6 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

May 17, 2016 12:45 PM
(717 views)

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

May 17, 2016 2:28 PM
(717 views)

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

May 17, 2016 3:14 PM
(717 views)

I am a little confused about your statement that it is hard to make a script that uses the Distribution or Oneway platform to create a normal quantile plot or a CDF plot. Are you looking for a separate function that generates such a plot? You can generate a Graph Box, and then place into it any graphics you want. But you would have to generate the Normal quantile or CDF plots from scratch.

I am also wondering if you are not aware that all you have to do to create such a script, is to interactively create the display output using the platform you want, and then to go to the red triangle==>script==>Write Script to Script Window. It generates the exact code you need to generate the normal quantile of CDF plot, or whatever else you have specified.

Is this getting closer to what you need?

Jim

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

May 18, 2016 5:44 AM
(717 views)

hi, Jim,

Yes, I am looking for a separate function that generates such a plot so that I could iterate it in a loop to plot the plots one by one and output it into a journal, then save a .png. The situation that normal qualtiles plot is embedded in either oneway or distribution make it difficult for me to enable it (my skill in scripting).

With your helps, I am able to make it just plot the normal quantile. I do not know how to change the title of the plot though.

Oneway(

Y( :height ),

X( :sex ),

All Graphs( 0 ),

Plot Quantile by Actual( 1 ),

Line of Fit( 0 ),

Mean Diamonds( 0 ),

X Axis Proportional( 0 ),

Grand Mean( 0 ),

SendToReport(

Dispatch(

{"Normal Quantile Plot"},

"2",

ScaleBox,

{Label Row( Label Orientation( "Vertical" ) )}

)

)

);

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

May 18, 2016 7:28 AM
(717 views)

I will first deal with the figuring out, of how to change the Title of the Plot. I assume, what you are referring to, is the Title of the Outline Box that has the Title of "Normal Quantile Plot". The simple answer to this is that you change it interactively, and then have JMP generate the script. In the script, you will see the method to change the title.

Here is the script that JMP generated that will produce the change in the title

Oneway**(**

Y**(** :height **)**,

X**(** :sex **)**,

All Graphs**(** **0** **)**,

Plot Quantile by Actual**(** **1** **)**,

Line of Fit**(** **0** **)**,

X Axis Proportional**(** **0** **)**,

Grand Mean**(** **0** **)**,

SendToReport**(**

Dispatch**(**

**{}**,

"Normal Quantile Plot",

OutlineBox,

**{**Set Title**(** "This is the title change" **)}**

**)**,

Dispatch**(**

**{**"Normal Quantile Plot"**}**,

"2",

ScaleBox,

**{**Label Row**(** Label Orientation**(** "Vertical" **)** **)}**

**)**

**)**

**)**;

So given that, you can turn the title into a JMP variable, and just use it in the above structure

MyTitle = "Here is a new Change";

Oneway**(**

Y**(** :height **)**,

X**(** :sex **)**,

All Graphs**(** **0** **)**,

Plot Quantile by Actual**(** **1** **)**,

Line of Fit**(** **0** **)**,

X Axis Proportional**(** **0** **)**,

Grand Mean**(** **0** **)**,

SendToReport**(**

Dispatch**(**

**{}**,

"Normal Quantile Plot",

OutlineBox,

**{**Set Title**(** MyTitle**)}**

**)**,

Dispatch**(**

**{**"Normal Quantile Plot"**}**,

"2",

ScaleBox,

**{**Label Row**(** Label Orientation**(** "Vertical" **)** **)}**

**)**

**)**

**)**;

Now, lets deal with the generation of all of the graphs. Using the Big Class data table, there are really only 2 columns to be graphed, but that is enough to illustrate the method.

Names Default To Here**(** **1** **)**;

dt = Open**(** "$SAMPLE_DATA/Big Class.jmp" **)**;

// Get the continuous columns from the data table

ColList = dt << **get column names(** continuous **)**;

// Loop across the list of columns and produce a graph for each column

For**(** i = **1**, i <= N Items**(** ColList **)**, i++,

MyTitle = "Here is a new Change " || char**(**i**)**;

Oneway**(**

Y**(** ColList**[**i**]** **)**,

X**(** :sex **)**,

All Graphs**(** **0** **)**,

Plot Quantile by Actual**(** **1** **)**,

Line of Fit**(** **0** **)**,

X Axis Proportional**(** **0** **)**,

Grand Mean**(** **0** **)**,

SendToReport**(**

Dispatch**(** **{}**, "Normal Quantile Plot", OutlineBox, **{**Set Title**(** MyTitle **)}** **)**,

Dispatch**(** **{**"Normal Quantile Plot"**}**, "2", ScaleBox, **{**Label Row**(** Label Orientation**(** "Vertical" **)** **)}** **)**

**)**

**)**;

**)**;

It produces a separate display for each Normal Quantile Plot

So the next step will put them all together in one window

Names Default To Here**(** **1** **)**;

dt = Open**(** "$SAMPLE_DATA/Big Class.jmp" **)**;

// Get the continuous columns from the data table

ColList = dt << **get column names(** continuous **)**;

// Create your own display window and generate the graph inside

New Window**(** "Here are the graphs",

// Now I am choosing to put all of the graphs side by side so I am

// using an H List Box() to encaptulate the graphs

H List Box**(**

// Loop acrss the list of columns and produce a graph for each column

For**(** i = **1**, i <= N Items**(** ColList **)**, i++,

MyTitle = "Here is a new Change " || Char**(** i **)**;

Oneway**(**

Y**(** ColList**[**i**]** **)**,

X**(** :sex **)**,

All Graphs**(** **0** **)**,

Plot Quantile by Actual**(** **1** **)**,

Line of Fit**(** **0** **)**,

X Axis Proportional**(** **0** **)**,

Grand Mean**(** **0** **)**,

SendToReport**(**

Dispatch**(** **{}**, "Normal Quantile Plot", OutlineBox, **{**Set Title**(** MyTitle **)}** **)**,

Dispatch**(** **{**"Normal Quantile Plot"**}**, "2", ScaleBox, **{**Label Row**(** Label Orientation**(** "Vertical" **)** **)}** **)**

**)**

**)**;,

**)**

**)**

**)**;

Which produces:

Jim

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

May 18, 2016 10:33 AM
(717 views)

hi, Jim

Where I wanted to change is :"Oneway Analysis".

Thanks for your helps!