Choose Language Hide Translation Bar

Community Trekker

Joined:

Jun 5, 2017

## How to add graphic script when X axis is character and nominal while Y is numeric

``````Names Default To Here( 1 );
Open( "\$SAMPLE_DATA/Big Class.jmp" );
Oneway( Y( :height ), X( :sex ) ,
SendToReport(

Dispatch(
{},
"Oneway Plot",
FrameBox,
{Frame Size(702, 300 ),
2,
Description( "Script" ),
Pen Color( "Red" );
Pen Size( 1 );
Marker Size( 5 );
Marker( 4, {5, 60} );
)})))``````

I am having trouble, in adding marker for oneway plot. X-axis is nominal and character. Above is just an example. but X axis can have multiple character nominal values like A,B,C,D...... Could any one suggest how to align multiple markers with multiple x axis nominal values?

Thanks

Ram

1 ACCEPTED SOLUTION

Accepted Solutions

Staff

Joined:

Jun 23, 2011

Solution

## Re: How to add graphic script when X axis is character and nominal while Y is numeric

There are two modes to the X axis in oneway, depending on whether you have the X Axis Proportional option turned on or not. It's on by default.

With the proportional X axis, think of the scale being from 0 to nrows with each categorical level taking up its row count. So in the Big Class example there are 18 females and 22 males, so F goes from 0 to 18 and M goes from 18 to 40. To place a marker in the middle of the F area, set X to 18/2 = 9.

With a non-proportional X axis, the scale goes from 0 to nlevels.

2 REPLIES 2

Staff

Joined:

Jun 23, 2011

Solution

## Re: How to add graphic script when X axis is character and nominal while Y is numeric

There are two modes to the X axis in oneway, depending on whether you have the X Axis Proportional option turned on or not. It's on by default.

With the proportional X axis, think of the scale being from 0 to nrows with each categorical level taking up its row count. So in the Big Class example there are 18 females and 22 males, so F goes from 0 to 18 and M goes from 18 to 40. To place a marker in the middle of the F area, set X to 18/2 = 9.

With a non-proportional X axis, the scale goes from 0 to nlevels.

Community Trekker

Joined:

Jun 5, 2017

## Re: How to add graphic script when X axis is character and nominal while Y is numeric

Thank you Gregg for explaining the logic behind it. I will try to manage that with script using the logic you explained.

Regards

Ram