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
- :
- Discussions
- :
- Is it possible to swap the x and y axis in JMP?

Topic Options

- Start Article
- 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

Nov 22, 2012 8:31 AM
(6758 views)

I would like to graph an overlay plot. JMP limits me to putting the numerical values on the Y-Axis. I am unable to put multiple numerical parameters on the X-axis? Is there a way in JMP (JSL script even) to swap the axis?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

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

You need to add the bars to your graph and then change the bar style to interval.

Open("$SAMPLE_DATA\Big Class.jmp");

Graph Builder(

Variables( X( :height ), X( :weight, Position( 1 ) ), Y( :name ) ),

Elements(

Bar(

X( 1 ),

X( 2 ),

Y,

Legend( 2 ),

Bar Style( "Interval" ),

Summary Statistic( "Mean" )

)

)

)

-Jeff

10 REPLIES 10

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

Re: Is it possible to swap the x and y axis in JMP?

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

Re: Is it possible to swap the x and y axis in JMP?

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

Re: Is it possible to swap the x and y axis in JMP?

My apologies -- I didn't notice that you were trying to plot *multiple* x-axis values.

I do not know how to plot multiple x-axis values. I would suggest using separate charts, or you could try something primitive like rescaling your x-axis variables so that they can all be plotted using a single x-axis scale.

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

Re: Is it possible to swap the x and y axis in JMP?

I don't think it's possible to get the graph you want out of the Overlay Plot platform.

However, you should be able to use Graph Builder to get the plot you want.

You can have multiple numeric variables on the X and Y axes in Graph Builder.

-Jeff

-Jeff

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

Re: Is it possible to swap the x and y axis in JMP?

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

You need to add the bars to your graph and then change the bar style to interval.

Open("$SAMPLE_DATA\Big Class.jmp");

Graph Builder(

Variables( X( :height ), X( :weight, Position( 1 ) ), Y( :name ) ),

Elements(

Bar(

X( 1 ),

X( 2 ),

Y,

Legend( 2 ),

Bar Style( "Interval" ),

Summary Statistic( "Mean" )

)

)

)

-Jeff

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

Re: Is it possible to swap the x and y axis in JMP?

Absolutely fantastic thanks. I'll pretend to everyone I sorted that myself!! :-)

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

Re: Is it possible to swap the x and y axis in JMP?

Sorry last question..Can i do this for more than 2 parameters. I cannot seem to get the bar to connect to more than two. Also is there a way to change the marker point of each interval to distinguish it from the other?

Any help would be great.

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

Re: Is it possible to swap the x and y axis in JMP?

You can stack the variables into a single column in a new table. Then in Graph Builder, set the data as X, your categories as Y and the "Label" (your original variable names) as Color. Add duplicate point-type elements: one with Summary Statistics = None and the other with Summary Statistics = Mean and Error bars = range. And finally hide the mean point by setting the color to white or transparent.

The example script below should replicate what I just tried to describe. It should draw a line across three variables:

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

dt << New Column**(** "h+w", Numeric, Continuous, Formula**(** :height + :weight **)** **)**; // Add a third variable

dt << Stack**(**

columns**(** :height, :weight, :Name**(** "h+w" **)** **)**,

Source Label Column**(** "Label" **)**,

Stacked Data Column**(** "Data" **)**

**)**; // Stack table

Graph Builder**(**

Size**(** **565**, **514** **)**,

Show Control Panel**(** **0** **)**,

Variables**(** X**(** :Data **)**, Y**(** :name **)**, Color**(** :Label **)** **)**,

Elements**(**

Points**(** X, Y, Color, Legend**(** **1** **)**, Jitter**(** **0** **)**, Error Bars**(** "Range" **)**, Summary Statistic**(** "Mean" **)** **)**,

Points**(** X, Y, Color, Legend**(** **4** **)**, Jitter**(** **0** **)** **)**

**)**,

SendToReport**(**

Dispatch**(** **{}**, "name", ScaleBox, **{**Show Major Ticks**(** **0** **)}** **)**,

Dispatch**(**

**{}**,

"400",

ScaleBox,

**{**Legend Model**(** **1**, Properties**(** **0**, **{**Line Color**(** **2** **)**, Fill Color**(** **0** **)}** **)** **)**,

Legend Model**(** **4**, Properties**(** **0**, **{**Line Color**(** **21** **)}** **)** **)}**

**)**,

Dispatch**(** **{}**, "400", LegendBox, **{**Position**(** **{**-**1**, **0**, **1**, **2****}** **)}** **)**,

Dispatch**(** **{}**, "Graph Builder", FrameBox, **{**Marker Size**(** **5** **)}** **)**

**)**

**)**;