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

Vector Plot in JMP

Hi, I am trying to do a vector plot in JMP but I have not been able to. The following POST had a blog on it but it looks like the blog has been archived. I am doing some data exploration and I have my dx and dy columns figured out. Is there a way to do this in graph builder? I vaguely remember that you have to updated customize graph below to make this happen (see image below)

tarkan_bih_0-1678478385290.png

 



1 ACCEPTED SOLUTION

Accepted Solutions
hogi
Level XII

Re: Vector Plot in JMP

With a local data filter, you have to get the non-excluded rows on your own:

dt = Open( "$DOWNLOADS/ChicagoWind.jmp" );

biv = dt << Bivariate(
	Y( :Lat1 ),
	X( :Lon1 ),
	Show Points( 1 ), 

);
ldf = biv << Local Data Filter(
	Add Filter(
		columns( :STN ),
		Where( :STN == "BIV" )
	)
);
Report( biv )[FrameBox( 1 )] << Add Graphics Script(
	Pen Size( 2 );
	myRows = ldf << Get Filtered Rows;
	For Each Row(
		If( Loc( myRows, Row() ),
			Arrow( {:Lon1, :Lat1}, {:Lon2, :Lat2} )
		)
	);
);

View solution in original post

4 REPLIES 4
hogi
Level XII

Re: Vector Plot in JMP

You can open the jmp file in the post that you linked.

 

wow, amazingly easy:

hogi_0-1678481877631.png


By the way, the development team seems to investigate if it is worth to add such a feature to Jmp by default:
Add vector fields to Graph Builder 

tarkan_bih
Level III

Re: Vector Plot in JMP

 Thanks! One thing I noticed when using 'customize...' is that when I use local data filter does remove the other vectors drawings as seen below. Is there way to only have it draw based and filter based on what is inside the local data filter

tarkan_bih_0-1678725071961.png

 

hogi
Level XII

Re: Vector Plot in JMP

The easiest way : use a global data filter. 

then you can restrict the vector plot to the non-excluded rows by:

For Each Row( If( Not( Excluded() ), Arrow( {:Lon1, :Lat1}, {:Lon2, :Lat2} ) ) );

 

hogi
Level XII

Re: Vector Plot in JMP

With a local data filter, you have to get the non-excluded rows on your own:

dt = Open( "$DOWNLOADS/ChicagoWind.jmp" );

biv = dt << Bivariate(
	Y( :Lat1 ),
	X( :Lon1 ),
	Show Points( 1 ), 

);
ldf = biv << Local Data Filter(
	Add Filter(
		columns( :STN ),
		Where( :STN == "BIV" )
	)
);
Report( biv )[FrameBox( 1 )] << Add Graphics Script(
	Pen Size( 2 );
	myRows = ldf << Get Filtered Rows;
	For Each Row(
		If( Loc( myRows, Row() ),
			Arrow( {:Lon1, :Lat1}, {:Lon2, :Lat2} )
		)
	);
);