cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.

JSL이용하여 원하는 점간 연결

Johnlee
Level I

Johnlee_0-1741227429653.png

 

첨부 이미지와 같이 그래프 빌더에서 원하는 좌표값 끼리 선으로 연결하고 싶은데,

어떻게 하는지 아시는분 계시나요? 

 

PCB에서 Scale 변화를 표현하고 싶은데, 위의 방식으로 표현할 수 있는 방법을 부탁합니다.

 

4 REPLIES 4
Johnlee
Level I

Re: JSL이용하여 원하는 점간 연결

As shown in the attached image, I want to connect to the desired coordinate value line in the graph builder,

Does anyone know how to do it?



I'd like to express the scale change on the PCB, but please give me a way to express it in the above way.

txnelson
Super User

Re: JSL이용하여 원하는 점간 연결

Welcome to the JMP Community.

Do you want to do this interactively or with JSL?

Interactively

      You can use the Annotation Tools to draw lines, polygons, circles, etc.

txnelson_0-1741228844976.png

     You can also right click on the graph window and select Customize

txnelson_1-1741228976533.png

and add lines, rectangles, etc. 

txnelson_2-1741229128959.png

Using JSL

      The above last example is actually a method that bridges from Interactive usage to writing a script using JSL.  If what you are looking for is a JSL solution, JMP provides a complete set of graphic primitives that can be used to draw whatever lines, objects, text etc. you need.

       Graph Box

       There is a display object called Graph Box who's purpose is to provide a blank display frame to draw whatever one desires.

txnelson_3-1741229843252.png

Names Default To Here( 1 );
New Window( "Example",
	Graph Box(
		Frame Size( 300, 300 ),
		Marker( Marker State( 3 ), [11 44 77], [75 25 50] );
		Pen Color( "Blue" );
		Line( [10 30 70], [88 22 44] );
	)
);

     Add Graphics Script

     JMP also has the ability that through JSL, can add graphics to any of the graphical outputs from any of the JMP Platforms.  Graph Builder being one of those JMP Platforms.

txnelson_4-1741231044279.png

names default to here( 1 );
dt =
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );

gb = Graph Builder(
	Variables( X( :weight ), Y( :height ) ),
	Elements( Points( X, Y, Legend( 3 ) ) ),
	SendToReport(
		Dispatch( {}, "400", ScaleBox,
			{Legend Model(
				3,
				Properties( 0, {Line Color( 2 )}, Item ID( "height", 1 ) )
			)}
		)
	)
);

framebox = report(gb)[frame box( 1 )];
framebox << Add Graphics Script(
	Transparency( 0.5 );
	Fill Color( {1.0, 0.5, 0.0} );
	Polygon( [60, 72, 57], [75, 120, 120] );
	
	Pen size( 3 );
	pen color ( 1 );
	line( {80,60}, {140,65});
);
Jim
Johnlee
Level I

Re: JSL이용하여 원하는 점간 연결

이전에 당신이 다른 분의 질문에 답한 내용을 바탕으로 재 질문 드립니다.

저는 아래 데이터에서 같은 Quad 끼리 연결하되 네모 모양으로 닫힌 형태로 점을 연결하고 싶습니다.
방법이 있다면 알려주시면 감사하겠습니다.

 

그리고 category 항목이 하나의 그래프에 오버레이되어 표현하여 scale이 얼마나 줄었나를 표현하고 싶습니다.

 

categoryQuadPointPathXY
CADQ114492.35489.45
CADQ123492.35267.65
CADQ131265.15489.45
CADQ142265.15267.65
CADQ254492.35247.35
CADQ263492.3525.55
CADQ271265.15247.35
CADQ282265.1525.55
CADQ394244.85489.45
CADQ3103244.85267.65
CADQ311117.65489.45
CADQ312217.65267.65
CADQ4134244.85247.35
CADQ4143244.8525.55
CADQ415117.65247.35
CADQ416217.6525.55
BoardQ114492.336489.438
BoardQ123492.339267.64
BoardQ131265.143489.445
BoardQ142265.149267.649
BoardQ254492.341247.342
BoardQ263492.35225.544
BoardQ271265.15247.351
BoardQ282265.15925.554
BoardQ394244.843489.446
BoardQ3103244.85267.65
BoardQ311117.646489.455
BoardQ312217.657267.658
BoardQ4134244.851247.352
BoardQ4143244.85925.555
BoardQ415117.658247.359
BoardQ416217.66625.561
ExposureQ114492.339489.441
ExposureQ123492.337267.644
ExposureQ131265.146489.442
ExposureQ142265.144267.646
ExposureQ254492.347247.346
ExposureQ263492.34725.55
ExposureQ271265.154247.346
ExposureQ282265.15425.55
ExposureQ394244.845489.45
ExposureQ3103244.845267.654
ExposureQ311117.653489.45
ExposureQ312217.652267.654
ExposureQ4134244.855247.355
ExposureQ4143244.85525.559
ExposureQ415117.662247.354
ExposureQ416217.66225.558
txnelson
Super User

Re: JSL이용하여 원하는 점간 연결

Here is an example using your data and displaying it in lines on Graph Builder

txnelson_0-1741408543468.png

Here are your data displayed using a Graph Box

txnelson_1-1741408669538.png

Names Default To Here( 1 );
dt = Current Data Table();

dt << Sort(
	By( :category, :Quad, :Path ),
	Order( Ascending, Ascending, Descending ),
	Replace Table( 1 )
);

dtPoly = dt << summary( group( :category, :quad ), link to original table(0) );

New Window( "Example",
	Graph Box(
		Frame Size( 300, 300 ),
		X Scale( Col Min( dt:x ) - 50, Col Max( dt:x ) + 50 ),
		Y Scale( Col Min( dt:y ) - 50, Col Max( dt:y ) + 50 ),
		Pen Color( "Black" );
		For( i = 1, i <= N Rows( dtPoly ), i++,
			theRows = dt << get rows where(
				dt:category == dtPoly:category[i] & dt:quad == dtPoly:quad[i]
			);
			theRows = theRows |/ Matrix( theRows[1] );
			Line( dt:X[theRows], dt:Y[theRows] );
		);
	)
);

I am not sure what you are specifically looking for.

Jim