cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
%3CLINGO-SUB%20id%3D%22lingo-sub-199535%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EHow%20do%20I%20make%20a%20graph%20with%20secondary%20x-axis%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-199535%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EI%20want%20to%20make%20a%20plot%20of%20two%20data%20series%20with%20overlayed%20x-axes.%20How%20is%20this%20possible%20in%20JMP%3F%20It%20is%20easily%20done%20in%20MS%20Excel%20-%20see%20below%20and%20attached.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Plot.JPG%22%20style%3D%22width%3A%20558px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Plot.JPG%22%20style%3D%22width%3A%20558px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Plot.JPG%22%20style%3D%22width%3A%20558px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F17069i36EAF9687A226DE0%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Plot.JPG%22%20alt%3D%22Plot.JPG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-671290%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20How%20do%20I%20make%20a%20graph%20with%20secondary%20x-axis%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-671290%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EA%20bit%20late%20(4%20years)%2C%20I%20had%20a%20similar%20problem%2C%20mine%20was%20different%20time%20steps%20but%20the%20same%20scale%2C%20and%20it%20can%20be%20done.%20If%20you%20are%20using%20graph%20builder%2C%20drag%20both%20variables%20that%20you%20want%20into%20the%20x-axis%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222023-08-24%20(4).png%22%20style%3D%22width%3A%20600px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222023-08-24%20(4).png%22%20style%3D%22width%3A%20600px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222023-08-24%20(4).png%22%20style%3D%22width%3A%20600px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F56004i97A5ED82CD019BA5%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222023-08-24%20(4).png%22%20alt%3D%222023-08-24%20(4).png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThen%2C%20right%20click%20the%20data%20points%20on%20the%20graph%20where%20you%20want%20to%20change%20the%20x-axis%20to%20display%20the%20following%20menu%2C%20just%20select%20the%20variable%20that%20you%20want%20to%20use%20for%20the%20x-axis.%26nbsp%3B%20In%20my%20case%2C%20I%20had%20a%20daily%20and%20a%20weekly%20time%20scale.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222023-08-24%20(2).png%22%20style%3D%22width%3A%20476px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222023-08-24%20(2).png%22%20style%3D%22width%3A%20476px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222023-08-24%20(2).png%22%20style%3D%22width%3A%20476px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F56003iE4674817EBF33DCF%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222023-08-24%20(2).png%22%20alt%3D%222023-08-24%20(2).png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20different%20scales%20you%20can%20merge%20the%20axes.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-200779%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20How%20do%20I%20make%20a%20graph%20with%20secondary%20x-axis%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-200779%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EI%20believe%20your%20assessment%20is%20correct.%26nbsp%3B%20I%20do%20not%20think%20there%20currently%20is%20a%20way%20to%20generate%20a%20second%20X%20Axis.%26nbsp%3B%20It%20is%20a%20great%20idea%2C%20so%20I%20encourage%20you%20to%20add%20it%20to%20the%20JMP%20Wish%20List.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-200716%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20How%20do%20I%20make%20a%20graph%20with%20secondary%20x-axis%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-200716%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ENo%2C%20unfortunately%20this%20is%20not%20what%20I%20want.%20Your%20solution%20gives%20me%20a%20%22nested%22%20x-axis%2C%20i.e.%20in%20reality%26nbsp%3Btwo%20x-axes%20next%20to%20each%20other.%20I%20want%20them%20stacked%2C%20i.e.%20both%20scales%20span%20left%20to%20right%20once%20and%20each%20curve%20is%20represented%20by%20its%20own%20axis.%20Actually%2C%20I%20ask%20for%20the%20very%20same%20concept%20as%20a%20secondary%20y-axis.%20It%20just%20seems%20not%20to%20exist%20for%20an%20x-axis%20in%20JMP.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-200569%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20How%20do%20I%20make%20a%20graph%20with%20secondary%20x-axis%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-200569%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F9068%22%20target%3D%22_blank%22%3E%40Morten%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BYou%20can%26nbsp%3B%3CEM%3Eeasily%26nbsp%3B%3C%2FEM%3Edo%20that%20in%20JMP.%20If%20you%20wanted%20to%20do%20that%20using%20a%20script%2C%20here%20is%20an%20example%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FBig%20Class.jmp%22%20)%3B%0Agb1%20%3D%20dt%20%26lt%3B%26lt%3B%20Graph%20Builder(Variables(%20X(%20%3Asex%20)%2C%20X(%20%3Aage%2C%20Position(%201%20)%20)%2C%20Y(%20%3Aheight%20)%20)%2C%0A%20%20%20%20%20Elements(%20Points(%20X(%201%20)%2C%20X(%202%20)%2C%20Y%2C%20Legend(%2024%20)%20)%20)%0A%20%20%20%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BIf%20you%20wanted%20to%20use%20the%20interactive%20platform%2C%20just%20drop%20a%20variable%20on%20the%20x-axis%20.%20Then%20bring%20the%20second%20variable%20and%20hover%20it%20on%20the%20x-axis%2C%20JMP%20will%20tell%20you%20what%20will%20happen%20depending%20on%20where%20you%20drop%20it%20.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
Morten
Level II

How do I make a graph with secondary x-axis?

I want to make a plot of two data series with overlayed x-axes. How is this possible in JMP? It is easily done in MS Excel - see below and attached.

Plot.JPG

 

 

4 REPLIES 4
uday_guntupalli
Level VIII

Re: How do I make a graph with secondary x-axis?

@Morten ,

       You can easily do that in JMP. If you wanted to do that using a script, here is an example: 

 

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
gb1 = dt << Graph Builder(Variables( X( :sex ), X( :age, Position( 1 ) ), Y( :height ) ),
			  Elements( Points( X( 1 ), X( 2 ), Y, Legend( 24 ) ) )
			 );

     If you wanted to use the interactive platform, just drop a variable on the x-axis . Then bring the second variable and hover it on the x-axis, JMP will tell you what will happen depending on where you drop it . 

 

 

Best
Uday
Morten
Level II

Re: How do I make a graph with secondary x-axis?

No, unfortunately this is not what I want. Your solution gives me a "nested" x-axis, i.e. in reality two x-axes next to each other. I want them stacked, i.e. both scales span left to right once and each curve is represented by its own axis. Actually, I ask for the very same concept as a secondary y-axis. It just seems not to exist for an x-axis in JMP.

txnelson
Super User

Re: How do I make a graph with secondary x-axis?

I believe your assessment is correct.  I do not think there currently is a way to generate a second X Axis.  It is a great idea, so I encourage you to add it to the JMP Wish List.

Jim
HydroBug
Level II

Re: How do I make a graph with secondary x-axis?

A bit late (4 years), I had a similar problem, mine was different time steps but the same scale, and it can be done. If you are using graph builder, drag both variables that you want into the x-axis:

 

2023-08-24 (4).png

Then, right click the data points on the graph where you want to change the x-axis to display the following menu, just select the variable that you want to use for the x-axis.  In my case, I had a daily and a weekly time scale.

2023-08-24 (2).png

 

For different scales you can merge the axes.

Recommended Articles