cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
matth1
Level IV

Change axis width in Graph Builder

I would like to change the axis width in Graph Builder, but the <<Set Width message doesn't seem to work. My demo script:

 

Names Default To Here( 1 ); 
dt_class = Open( "$SAMPLE_DATA/Big Class.jmp" );
gb_test = Graph Builder(
	Size( 534, 454 ),
	Show Control Panel( 0 ),
	Variables(
		X( :height ),
		Y( :name, Order By( :height, Ascending, Order Statistic( "Mean" ) ) )
	),
	Elements( Bar( X, Y, Legend( 4 ) ) )
);
show( Report( gb_test )["Graph Builder",AxisBox(2)] << get width() );
Report( gb_test )["Graph Builder",AxisBox(2)] << set width( 200 );
show( Report( gb_test )["Graph Builder",AxisBox(2)] << get width() );

And the result:

Report(gb_test)["Graph Builder",AxisBox(2)] << get width() = 68;
Report(gb_test)["Graph Builder",AxisBox(2)] << get width() = 68;

Specifically it's the width of the area available for the y-axis labels. 

The reason is I have a dataset with some very long labels and I want to reduce the default width so the labels wrap and make the chart cleaner.

I'm using JMP 17.2 on MacOS.

There's a similar question from 2014 which wasn't resolved: https://community.jmp.com/t5/Discussions/Changing-axis-box-width-in-graph-builder/td-p/9955

3 REPLIES 3
txnelson
Super User

Re: Change axis width in Graph Builder

I believe you have discovered a JMP bug.  

<< Set Width()

does not change the Axis Box() width in Graph Builder.

Interactively, the Axis width can be changed, and the change is reflected in the Stretching Property of the AxisBox.

 

Concerning 

<< Get Width

The Scripting Index does not show a Get Width message as being valid. Regardless, it does seem to work for Bivariate, Oneway, Contour.......

However, what is returned when run against Graph Builder is a completely bogus.

 

I believe that you need to contact JMP Support to work through this.

Jim
jthi
Super User

Re: Change axis width in Graph Builder

I think GraphBuilderTitleBox or some other display box could be messing with the axis box width (graph builder's "special" boxes are most likely the most annoying/buggy display boxes in JMP).

-Jarmo
matth1
Level IV

Re: Change axis width in Graph Builder

Thanks both. Case TS-00127657 opened.