cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
leonxf
Level II

How to draw a chart with percentile on the horizontal axis and the number of observations on the vertical?

Hi,

 

Now I have build a graph like below, showing the distribution of a variable based on its percentiles. Each dot is an observation. Now I wish to show a chart with percentile on the horizontal axis (currently on the vertical axis) and the number of observations on the vertical axis. Can JMP do it without requiring me to create a new "count of observation for each percentile range" variable? Thanks.

 

leonxf_0-1690098801012.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How to draw a chart with percentile on the horizontal axis and the number of observations on the vertical?

This can easily be accomplished by using JMP's ability to add virtual columns.  Assuming your data table has a column that has the percentile value, such as below

txnelson_0-1690103273400.png

Then open Graph Builder and drag the percentile column to the X axis

txnelson_1-1690103403968.png

Next, a virtual count variable needs to be created.  Right click on the Percentile column and select Formula

txnelson_2-1690103569452.png

Change the value of the formula from the original column( in my example Percentile), to just the number "1"

txnelson_3-1690103734530.png

If you right click on the Transform(percentile) column, you can select "Rename" and change the name to whatever you want.  I chose the name "Count"

txnelson_4-1690103932811.png

Close this window and now drag the new virtual column to the Y axis

txnelson_5-1690104050903.png

 

Now go to the Points control section and change the Summary Statistic to N

txnelson_6-1690104201646.png

And then finally right click on the chart, and select Smoother>Remove

txnelson_7-1690104301722.png

And you will get the final graph

txnelson_8-1690104394475.png

 

 

Jim

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: How to draw a chart with percentile on the horizontal axis and the number of observations on the vertical?

This can easily be accomplished by using JMP's ability to add virtual columns.  Assuming your data table has a column that has the percentile value, such as below

txnelson_0-1690103273400.png

Then open Graph Builder and drag the percentile column to the X axis

txnelson_1-1690103403968.png

Next, a virtual count variable needs to be created.  Right click on the Percentile column and select Formula

txnelson_2-1690103569452.png

Change the value of the formula from the original column( in my example Percentile), to just the number "1"

txnelson_3-1690103734530.png

If you right click on the Transform(percentile) column, you can select "Rename" and change the name to whatever you want.  I chose the name "Count"

txnelson_4-1690103932811.png

Close this window and now drag the new virtual column to the Y axis

txnelson_5-1690104050903.png

 

Now go to the Points control section and change the Summary Statistic to N

txnelson_6-1690104201646.png

And then finally right click on the chart, and select Smoother>Remove

txnelson_7-1690104301722.png

And you will get the final graph

txnelson_8-1690104394475.png

 

 

Jim
leonxf
Level II

Re: How to draw a chart with percentile on the horizontal axis and the number of observations on the vertical?

Thanks, Jim, marvelous.

 

But since many unique percentile numbers correspond to only 1 or 2 observations, the bottom line is too heavy:

 

leonxf_0-1690116305423.png

What I want is just like the chart below but the dots are not symmetric on Y axis. Is it possible? 

 

leonxf_1-1690116374343.png

 

txnelson
Super User

Re: How to draw a chart with percentile on the horizontal axis and the number of observations on the vertical?

Try using the Count virtual column as the Y variable, and change the graph display from Points to Bar

txnelson_0-1690127261250.png

 

Jim