Subscribe Bookmark RSS Feed

Multiple X and Y axes plots

Hi Guys,

How can I plot multiple X axes and multiple Y axes on the same plot?

I tried to use overlay plots but that gives me multiple Y axes only and not X.

Thanks.
1 ACCEPTED SOLUTION

Accepted Solutions
mpb

Super User

Joined:

Jun 23, 2011

Solution
Overlay Plot.
If your data looks like this:

x y1 y2
1 10 20
2 22
3 15
4 25 20
5 30

then in Overlay Plot put Y1 and Y2 in the Y box and X in the X box.

If your data looks like this:

x y attribute
1 10 a
2 20 b
3 12 a
4 15 a
5 35 b
6 45 b
7 20 a

then either use Tables > Split to reshape it like the previous data or use it as is in Overlay Plot with Y in the Y box, X in the X box and attribute in the Grouping box. When the plot shows, use the red triangle pull down to change the Overlay Plots item from "no overlay" to "overlay groups".
-->
9 REPLIES
mpb

Super User

Joined:

Jun 23, 2011

Are your multiple X axes really different, like time and temperature, or are they the same but with different values for each Y column? If the former I don't believe you can do it without scripting quite heavily. I'm having trouble visualizing why such a plot would be useful. If the latter it's pretty easy.
Hello,

I have the latter setup, I have X axis with different values for each Y column. Can you please explain how can we merge plots?

Thanks

Message was edited by: jmpnewuser
anybody?
mpb

Super User

Joined:

Jun 23, 2011

Solution
Overlay Plot.
If your data looks like this:

x y1 y2
1 10 20
2 22
3 15
4 25 20
5 30

then in Overlay Plot put Y1 and Y2 in the Y box and X in the X box.

If your data looks like this:

x y attribute
1 10 a
2 20 b
3 12 a
4 15 a
5 35 b
6 45 b
7 20 a

then either use Tables > Split to reshape it like the previous data or use it as is in Overlay Plot with Y in the Y box, X in the X box and attribute in the Grouping box. When the plot shows, use the red triangle pull down to change the Overlay Plots item from "no overlay" to "overlay groups".
-->


Message was edited by: jmpnewuser
mpb

Super User

Joined:

Jun 23, 2011

Your data can easily be made to look like my first example using cut and past or by using Tables > Stack.
mpb

Super User

Joined:

Jun 23, 2011

To help posting stuff without messing up spacing do this:

Thanks and see updated table for easy understanding.
Cut and paste is too much work for long tables. Stack only stacks either all X axis or Y axis not both (See Below). Other statistics softwares can easily plot this but I wanted to use JMP because of much more functionality, do you think if it is even possible with JMP.

Thanks
mpb

Super User

Joined:

Jun 23, 2011

You can do a multiple column stack. Look at the JMP User Guide and check the index for "Stacking Columns". After you do the stacking you may want to rename the column headers. One of the resulting columns identifies which y is being plotted. Use that column for Grouping in the Overlay Plot dialog. Then choose the option to "Overlay Groups".

Here is what your x1 y1 x2 y2 data looks like after a 2 column stack followed by relabling:


Message was edited by: mpb