BookmarkSubscribeRSS Feed
ram

Community Trekker

Joined:

Jun 5, 2017

How to add list on graph using "Add Graphics Script"?

HI All,

Using graphic script, can we add a list to the graph? I can do text, lines and others. But wondering if possible to add a list to the graph.

Why i want to add list: when i add lets say median by split the spacing between text is different and some times overlapped depending on the scale (zoom etc). so adding multiple text is not working in all cases since sometime they are far apart and sometime they are too close.

Thanks

Ram

3 REPLIES
markbailey

Staff

Joined:

Jun 23, 2011

Re: How to add list on graph using "Add Graphics Script"?

It is generally better to present lists of information or results in column boxes associated with the plot, not in the plot itself, from a design stand point. This approach leads to better clarity in the plot and easier scripting, because JMP display boxes support it.

Learn it once, use it forever!
pmroz

Super User

Joined:

Jun 23, 2011

Re: How to add list on graph using "Add Graphics Script"?

If you really want to show a list you can convert it to text either with char() or concat items().  char() will leave the curly braces and quotes; concat items() is a bit cleaner.

 

dt = open("$sample_data\Big Class.jmp");

alist = {"one", "two", "three"};
clist = concat items(alist, ", ");

Graph Builder(
	Size( 526, 451 ),
	Show Control Panel( 0 ),
	Variables( X( :weight ), Y( :height ), Overlay( :sex ) ),
	Elements( Points( X, Y, Legend( 6 ) ) ),
	SendToReport(
		Dispatch( {}, "Graph Builder", FrameBox,
			Add Text Annotation( Text( clist ),
				Text Box( {38, 43, 152, 68} )
			)
		)
	)
);
ram

Community Trekker

Joined:

Jun 5, 2017

Re: How to add list on graph using "Add Graphics Script"?

Very obvious, I guess in your solution there is no option to have different
colors for each items since now you are treating it as one single text.
Thanks