cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Zainab22
Level I

How to get my x-axis at the top/ above the graph instead of the default setting of x-axis being at the bottom?

Graph Builder(
	Size( 1068, 757 ),
	Show Control Panel( 0 ),
	Show Legend( 0 ),
	Variables(
		X( :SSS ),
		Y( :"$MLD"n ),
		Y( :ChlMD, Position( 1 ) ),
		Y( :depth, Position( 1 ) ),
		Color( :HabitatType )
	),
	Elements(
		Smoother( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 15 ) ),
		Points( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 17 ) )
	),
	SendToReport(
		Dispatch(
			{},
			"SSS",
			ScaleBox,
			{Label Row( {Label Orientation( "Vertical" ), Show Major Labels( 0 )} )}
		),
		Dispatch(
			{},
			"$MLD",
			ScaleBox,
			{Min( 116.734216796432 ), Max( -0.525034015687382 ), Inc( 20 ),
			Minor Ticks( 1 )}
		),
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				17,
				Properties( 5, {Marker( "Dot" )}, Item ID( "$MLD", 1 ) ),
				Properties( 6, {Marker( "Dot" )}, Item ID( "ChlMD", 1 ) ),
				Properties( 7, {Marker( "Dot" )}, Item ID( "depth", 1 ) )
			)}
		),
		Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} ),
		Dispatch( {}, "Y title", TextEditBox, {Set Text( "depth" )} )
	)
);
2 REPLIES 2
jthi
Super User

Re: How to get my x-axis at the top/ above the graph instead of the default setting of x-axis being at the bottom?

I'm not sure if this can be done (easily) in Graph Builder, but you can use journal to achieve at least something similarHow can I move the x-axis on top of graph? 

 

First create graph in graph builder, then go to edit/journal, select x-axis and move it to top of graph. This is a bit hacky solution and doesn't look as nice as graph builder (tick marks for example are in wrong side). You can also move the x-axis title (getting it to center might require some more modifications to display boxes).

jthi_0-1668843724156.png

 

You might also be able to modify the margin of x-axis in graph builder but it is dependent on the graph size and most likely even more hacky option.

-Jarmo
Zainab22
Level I

Re: How to get my x-axis at the top/ above the graph instead of the default setting of x-axis being at the bottom?

Thanks for the reply. I tried this solution, but as you said it ended up corrupting the graph and doesn't look accurate!