cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar

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
mpb
Level VII

Re: Multiple X and Y axes plots

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".
-->

View solution in original post

9 REPLIES 9
mpb
mpb
Level VII

Re: Multiple X and Y axes plots

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.

Re: Multiple X and Y axes plots

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

Re: Multiple X and Y axes plots

anybody?
mpb
mpb
Level VII

Re: Multiple X and Y axes plots

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".
-->

Re: Multiple X and Y axes plots

Hello mpb,

My Data looks like this:

x1	y1	x2	y2
1	10	2	20
2		2.5	22
3	15	3	
4	25	4	20
5		4.5	
6		5	30

I have 2 X axis and 2 Y axis and I need to merge them all and sort data accordingly.


Message was edited by: jmpnewuser

mpb
mpb
Level VII

Re: Multiple X and Y axes plots

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

Re: Multiple X and Y axes plots

To help posting code and data in the Commuity without messing up spacing use the Insert Code or Insert JSL buttons in the post editor.

SafariScreenSnapz314.png

Re: Multiple X and Y axes plots

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.

10	20	Column 1	1
10	20	Column 3	2
	22	Column 1	2
	22	Column 3	2.5
15		Column 1	3
15		Column 3	3
25	20	Column 1	4
25	20	Column 3	4
		Column 1	5
		Column 3	4.5
	30	Column 1	6
	30	Column 3	5

Thanks

mpb
mpb
Level VII

Re: Multiple X and Y axes plots

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:

Dummy   x     Property  y 
x1	1	y1	10
x1	2	y1	.
x1	3	y1	15
x1	4	y1	25
x1	5	y1	.
x1	6	y1	.
x2	2	y2	20
x2	2.5	y2	22
x2	3	y2	.
x2	4	y2	20
x2	4.5	y2	.
x2	5	y2	30

Message was edited by: mpb