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
Chris_Rodrigues
Level III

Lock Graph Builder Annotations in place

In Graph Builder charts I frequently place text box annotations on top of the charts.  When I add more charts, change the scale, or resize anything, I notice the annotation moves around and resizes itself automatically to try to stay where it thinks I want it to be.  But I find that the annotation never ends up where I want it, so I have to go move it again manually anyway.  Also, when the annotation text box resizes itself, it sometimes shrinks to a tiny sliver.  The text is still visible, but it is impossible to click on it to resize it or delete it.

 

I think it would be a lot more user-friendly if these text boxes were less "smart".  I'd rather just lock it in place so it does not ever move or resize itself, and if I change something I will move it manually.  I could not find this option in the preferences.  Are there any configurable options for shapes and annotations?  Is there a way to lock them in place, or turn off the "smart resizing" features?

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Lock Graph Builder Annotations in place

You can easily add notations to your graph that will not move, by using the "Customize" capability.  

customize.PNG

The notation was added interactively.  Below is the resulting script for the chart....

Note:  The Big Class sample data table was used for my example


Graph Builder(
	Variables( X( :weight ), Y( :height ) ),
	Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"weight",
			ScaleBox,
			{Min( 60 ), Max( 182.231404958678 ), Inc( 20 ), Minor Ticks( 0 )}
		),
		Dispatch(
			{},
			"height",
			ScaleBox,
			{Min( 50 ), Max( 75.140306122449 ), Inc( 5 ), Minor Ticks( 1 )}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{Add Graphics Script(
				2,
				Description( "Script" ),
				myList = {};
				Insert Into( myList, X Origin() + .2 * X Range() );
				Insert Into( myLIst, Y Origin() + .8 * Y Range() );
				Text( Center Justified, myList, "Here is a note" );
			), Grid Line Order( 1 ), Reference Line Order( 3 )}
		)
	)
);
Jim

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: Lock Graph Builder Annotations in place

You can easily add notations to your graph that will not move, by using the "Customize" capability.  

customize.PNG

The notation was added interactively.  Below is the resulting script for the chart....

Note:  The Big Class sample data table was used for my example


Graph Builder(
	Variables( X( :weight ), Y( :height ) ),
	Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"weight",
			ScaleBox,
			{Min( 60 ), Max( 182.231404958678 ), Inc( 20 ), Minor Ticks( 0 )}
		),
		Dispatch(
			{},
			"height",
			ScaleBox,
			{Min( 50 ), Max( 75.140306122449 ), Inc( 5 ), Minor Ticks( 1 )}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{Add Graphics Script(
				2,
				Description( "Script" ),
				myList = {};
				Insert Into( myList, X Origin() + .2 * X Range() );
				Insert Into( myLIst, Y Origin() + .8 * Y Range() );
				Text( Center Justified, myList, "Here is a note" );
			), Grid Line Order( 1 ), Reference Line Order( 3 )}
		)
	)
);
Jim
Chris_Rodrigues
Level III

Re: Lock Graph Builder Annotations in place

I'm not sure I'd call it "easily".  It requires scripting and it takes some trial and error to place the notes accurately, since you can't do it using the GUI.  But this meets my needs.  Thank you!

 

I still think the Text Box feature needs to be fixed so it never allows the text box to be shrunk to zero width or height.  I would consider this a bug.  After this happens it becomes impossible to change or remove the text boxes using the GUI; you basically have to start over and rebuild the graph.  Of course, you always can "save script to data table" and then edit the script to remove the offending text boxes, but this is also not an "easy" fix.  It's a bad enough problem that I will avoid using these text boxes entirely and go through the extra effort of using this Customize Graph JSL script to put these simple notes on my graphs.  Now that I know how to do it, it's not that big of a deal, but this is going to be a hard one to explain to any new users I am training on how to use JMP.

txnelson
Super User

Re: Lock Graph Builder Annotations in place

You need to add your request for the enhancement to the JMP Wish List.

Jim