Subscribe Bookmark RSS Feed

can i set axis box width?

mikedriscoll

Community Trekker

Joined:

Jun 23, 2011

Hi, I'd like to programmatically set the width of the axis box in a oneway plot.  The box sometimes is not wide enough after i've adjusted the min / max values.

To illustrate my use case, i've attached a jsl file using a sample data file. Run the file and if all goes well you should see the button box at the top. Click it and you'll see the problem I'm describing.

The key line I'm trying to implement is within the button box script:

report(oneObj2)[AxisBox(1)] << Min( 0.00001 ) << Max( 120.007 ) << Inc( 20.00001 ) << width (2);

These particular numbers above are unrealistic, but sometimes even numbers like "0.123" have the '0' cut off so it is hard to see if it is 0.123 or 1.123 etc. I picked the above numbers to exaggerate the problem.

I'm using JMP 10. I haven't yet installed 11.

Thanks,
Mike

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

I figured it out. I should have used the <<set width() instead of << width() command.

These both work (see original attached .jsl file for full workings) and it looks like this controls the width from the left side of the axis box to where the numbers on the axes starts.

vlb << append (

    bbObj = button box ("click to adjust axes",

        report(oneObj1)[AxisBox(1)] << Min( 0.00001 ) << Max( 120.00007 ) << Inc( 20.00001 ) << set width (0);

        report(oneObj2)[AxisBox(1)] << Min( 0.00001 ) << Max( 120.007 ) << Inc( 20.00001 ) << set width (200);   

    )

);

1 REPLY
Solution

I figured it out. I should have used the <<set width() instead of << width() command.

These both work (see original attached .jsl file for full workings) and it looks like this controls the width from the left side of the axis box to where the numbers on the axes starts.

vlb << append (

    bbObj = button box ("click to adjust axes",

        report(oneObj1)[AxisBox(1)] << Min( 0.00001 ) << Max( 120.00007 ) << Inc( 20.00001 ) << set width (0);

        report(oneObj2)[AxisBox(1)] << Min( 0.00001 ) << Max( 120.007 ) << Inc( 20.00001 ) << set width (200);   

    )

);