cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-229922%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E3%83%87%E3%83%BC%E3%82%BF%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB%E3%82%B0%E3%83%A9%E3%83%95%E3%83%93%E3%83%AB%E3%83%80%E3%83%BC%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E3%81%A7%E8%BB%B8%E3%81%AE%E6%9C%80%E5%A4%A7%2F%E6%9C%80%E5%B0%8F%E3%81%A8%E3%81%97%E3%81%A6%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8B%E5%A4%89%E6%95%B0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-229922%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E3%81%AB%E6%AC%A1%E3%81%AE%E8%A1%8C%E3%81%8C%E3%81%82%E3%82%8A%E3%80%81%E3%83%87%E3%83%BC%E3%82%BF%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB%E3%81%AB%E4%BF%9D%E5%AD%98%E3%81%97%E3%81%A6%E3%81%8B%E3%82%89%E3%82%B0%E3%83%A9%E3%83%95%E3%83%93%E3%83%AB%E3%83%80%E3%83%BC%E3%82%B0%E3%83%A9%E3%83%95%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B%E3%81%9F%E3%82%81%E3%81%AB%E5%AE%9F%E8%A1%8C%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E3%81%8B%E3%82%89%E3%82%B0%E3%83%A9%E3%83%95%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B%E3%81%A8%E3%80%81%E3%82%B0%E3%83%A9%E3%83%95%E3%83%93%E3%83%AB%E3%83%80%E3%83%BC%E3%81%AE%E6%9C%80%E5%A4%A7%E5%80%A4%E3%81%A8%E6%9C%80%E5%B0%8F%E5%80%A4%E3%81%A8%E3%81%97%E3%81%A6%E5%A4%89%E6%95%B0%E3%81%8C%E4%BD%BF%E7%94%A8%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%81%8C%E3%80%81%E3%83%87%E3%83%BC%E3%82%BF%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB%E3%81%AB%E4%BF%9D%E5%AD%98%E3%81%95%E3%82%8C%E3%81%9F%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B%E3%81%A8%EF%BC%88%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB%E3%82%92%E4%BB%96%E3%81%AE%E4%BA%BA%E3%81%AB%E6%B8%A1%E3%81%99%E3%81%AA%E3%81%A9%EF%BC%89%E3%80%81%E4%BB%A3%E3%82%8F%E3%82%8A%E3%81%AB%E3%83%87%E3%83%95%E3%82%A9%E3%83%AB%E3%83%88%E3%81%AE%E6%9C%80%E5%A4%A7%E5%80%A4%E3%81%A8%E6%9C%80%E5%B0%8F%E5%80%A4%E3%81%8C%E4%BD%BF%E7%94%A8%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%E6%8E%A8%E5%A5%A8%E4%BA%8B%E9%A0%85%E3%81%AF%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%81%8B%EF%BC%9F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Emin_val%20%3D%20col%20min(%3Acol1)%3B%0Amax_val%20%3D%20col%20max(%3Acol1)%3B%0A%0A%2F%2F%20rest%20of%20graph%20builder%20function%20not%20included%0A%0ADispatch(%0A%20%20%20%7B%7D%2C%0A%20%20%20%22Y%20Axis%20Name%22%2C%0A%20%20%20ScaleBox%2C%0A%20%20%20%7BMin(%20min_val%20)%2C%20Max(%20max%20val%20)%7D%0A%20%20)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E7%A7%81%E3%81%AF%E3%81%84%E3%81%8F%E3%81%A4%E3%81%8B%E3%81%AE%E3%81%93%E3%81%A8%E3%82%92%E8%A9%A6%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F%E3%81%8C%E3%80%81min_val%E3%81%A8max_val%E3%82%92%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB%E5%A4%89%E6%95%B0%E3%81%A8%E3%81%97%E3%81%A6%E4%BD%9C%E6%88%90%E3%81%97%E3%80%81%E3%81%9D%E3%82%8C%E3%82%89%E3%82%92%E3%83%87%E3%82%A3%E3%82%B9%E3%83%91%E3%83%83%E3%83%81%E3%81%AB%E6%B8%A1%E3%81%99%E3%81%A8%E3%80%81%E6%9C%80%E3%82%82%E6%9C%89%E6%9C%9B%E3%81%A0%E3%81%8C%E9%81%8B%E3%81%8C%E3%81%AA%E3%81%84%E3%82%88%E3%81%86%E3%81%AB%E6%84%9F%E3%81%98%E3%81%BE%E3%81%97%E3%81%9F-%E4%BB%A3%E3%82%8F%E3%82%8A%E3%81%AB%E3%83%87%E3%83%95%E3%82%A9%E3%83%AB%E3%83%88%E3%81%AEmin%E3%81%A8max%E3%81%8C%E4%BD%BF%E7%94%A8%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%E5%89%8D%E3%82%82%E3%81%A3%E3%81%A6%E6%84%9F%E8%AC%9D%E3%81%97%E3%81%BE%E3%81%99%EF%BC%81%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-230014%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%86%8D%EF%BC%9A%E3%83%87%E3%83%BC%E3%82%BF%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB%E3%82%B0%E3%83%A9%E3%83%95%E3%83%93%E3%83%AB%E3%83%80%E3%83%BC%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E3%81%A7%E8%BB%B8%E3%81%AE%E6%9C%80%E5%A4%A7%2F%E6%9C%80%E5%B0%8F%E3%81%A8%E3%81%97%E3%81%A6%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8B%E5%A4%89%E6%95%B0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-230014%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ESend%20to%20Report%EF%BC%88%EF%BC%89%E3%81%8A%E3%82%88%E3%81%B3Dispatch%EF%BC%88%EF%BC%89%E9%96%A2%E6%95%B0%E3%81%AF%E3%80%81%E3%83%97%E3%83%A9%E3%83%83%E3%83%88%E3%83%95%E3%82%A9%E3%83%BC%E3%83%A0%E3%81%A7%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%9E%E3%82%A4%E3%82%BA%E3%82%92%E4%BF%9D%E5%AD%98%E3%81%99%E3%82%8B%E3%81%9F%E3%82%81%E3%81%ABJMP%E3%81%AB%E3%82%88%E3%81%A3%E3%81%A6%E4%BD%BF%E7%94%A8%E3%81%95%E3%82%8C%E3%82%8B%E3%81%93%E3%81%A8%E3%82%92%E7%9B%AE%E7%9A%84%E3%81%A8%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E4%BD%9C%E6%88%90%E8%80%85%E3%81%AF%E3%80%81%E4%BB%A3%E3%82%8F%E3%82%8A%E3%81%AB%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%81%AB%E3%83%A1%E3%83%83%E3%82%BB%E3%83%BC%E3%82%B8%E3%82%92%E7%9B%B4%E6%8E%A5%E9%80%81%E4%BF%A1%E3%81%99%E3%82%8B%E5%BF%85%E8%A6%81%E3%81%8C%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20to%20Here(%201%20)%3B%0A%0A%2F%2F%20get%20example%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FBig%20Class.jmp%22%20)%3B%0A%0A%2F%2F%20pre-determine%20new%20scale%0Ay%20min%20%3D%2080%3B%0Ay%20max%20%3D%20100%3B%0A%0A%2F%2F%20launch%20Graph%20Builder%0Agb%20%3D%20dt%20%26lt%3B%26lt%3B%20Graph%20Builder(%0A%20Size(%20534%2C%20456%20)%2C%0A%20Show%20Control%20Panel(%200%20)%2C%0A%20Variables(%20X(%20%3Aheight%20)%2C%20Y(%20%3Aweight%20)%20)%2C%0A%20Elements(%20Points(%20X%2C%20Y%2C%20Legend(%203%20)%20)%20)%0A)%3B%0A%0A%2F%2F%20get%20reference%20to%20report%20layer%20with%20display%20boxes%0Agb%20rep%20%3D%20gb%20%26lt%3B%26lt%3B%20Report%3B%0A%0A%2F%2F%20send%20cascade%20of%20messages%20to%20y%20axis%0AWait(%203%20)%3B%0Agb%20rep%5BAxisBox(2)%5D%0A%20%26lt%3B%26lt%3B%20Min(%20y%20min%20)%0A%20%26lt%3B%26lt%3B%20Max(%20y%20max%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
bittnere
Level II

Variables to use as axis max/min in data table graph builder script

 

 

I have the following lines in my script I am saving to the data table and then running to make a graph builder graph. When I run the graph from the script it uses the variables as the max and min for graph builder but if I run the script saved to the data table (say I give the table to someone else) it uses default max and min instead. Any recommendations?

 

 

min_val = col min(:col1);
max_val = col max(:col1);

// rest of graph builder function not included

Dispatch(
			{},
			"Y Axis Name",
			ScaleBox,
			{Min( min_val ), Max( max val )}
		)

 

 

I've tried several things but creating min_val and max_val as table variables and passing those to the dispatch felt like the most promising but no luck - defaults min and max are instead used.

Thanks in advance!

 

1 REPLY 1

Re: Variables to use as axis max/min in data table graph builder script

The Send to Report() and Dispatch() functions are intended to be used by JMP to save user customizations in a platform. The scripter should instead send messages directly to the object.

 

Names Default to Here( 1 );

// get example
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

// pre-determine new scale
y min = 80;
y max = 100;

// launch Graph Builder
gb = dt << Graph Builder(
	Size( 534, 456 ),
	Show Control Panel( 0 ),
	Variables( X( :height ), Y( :weight ) ),
	Elements( Points( X, Y, Legend( 3 ) ) )
);

// get reference to report layer with display boxes
gb rep = gb << Report;

// send cascade of messages to y axis
Wait( 3 );
gb rep[AxisBox(2)]
	<< Min( y min )
	<< Max( y max );

Recommended Articles