BookmarkSubscribeRSS Feed
Choose Language Hide Translation Bar
terapin
Community Trekker

Wind Rose for Wind Speed and Direction

 

I'm looking for a way in JMP 14 to plot a wind rose for wind speed and direction, as shown below.  Can that be accomplished currently in JMP, or is that a feature to request?  Thanks.

 

WindRose.jpg

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
txnelson
Super User

Re: Wind Rose for Wind Speed and Direction

Here is a sample script that is a real rough example of how you might start

wind rose.PNG

Names Default To Here( 1 );
nw = New Window( "Example",
	Graph Box(
		FrameSize( 600, 600 ),
		suppressAxes,
		Gradient Function( b, a, b, [0, 100], Z Color( [2, 9] ) ),
		Pen Color( "black" );
		Circle(
			{50, 50},
			15,
			30,
			45/* no fill for concentric circles */
		);
		xMat = [50, 95];
		yMat = [50, 50];
		Line( xMat, yMat );
		xMat = [50, 5];
		yMat = [50, 50];
		Line( xMat, yMat );
		xMat = [50, 50];
		yMat = [50, 95];
		Line( xMat, yMat );
		xMat = [50, 50];
		yMat = [50, 5];
		Line( xMat, yMat );
		xMat = [50, 81.8198051533946];
		yMat = [50, 81.8198051533946];
		Line( xMat, yMat );
		xMat = [50, 18.1801948466054];
		yMat = [50, 81.8198051533946];
		Line( xMat, yMat );
		xMat = [50, 81.8198051533946];
		yMat = [50, 18.1801948466054];
		Line( xMat, yMat );
		xMat = [50, 18.1801948466054];
		yMat = [50, 18.1801948466054];
		Line( xMat, yMat );
		xMat = [50, 91.8];
		yMat = [50, 67.];
		Line( xMat, yMat );
		xMat = [50, 8.2];
		yMat = [50, 67.];
		Line( xMat, yMat );
		xMat = [50, 91.8];
		yMat = [50, 33.];
		Line( xMat, yMat );
		xMat = [50, 8.2];
		yMat = [50, 33.];
		Line( xMat, yMat );
		xMat = [50, 33];
		yMat = [50, 91.8];
		Line( xMat, yMat );
		xMat = [50, 33];
		yMat = [50, 8.2];
		Line( xMat, yMat );
		xMat = [50, 67];
		yMat = [50, 91.8];
		Line( xMat, yMat );
		xMat = [50, 67];
		yMat = [50, 8.2];
		Line( xMat, yMat );
		Fill Color( "cyan" );,
		Pie( 7, 93, 93, 7, 255, 285 ),
		Pie( 7, 93, 93, 7, 225, 255 ),
		Fill Color( "red" ),
		Pie( 17, 83, 83, 17, 225, 255 ),
		Text Color( "Black" ),
		Text Size( 16 ),
		Text( Center Justified, {50, 95}, "N" ),
		Text( Center Justified, {50, 1}, "S" ),
		Text( Center Justified, {3, 50}, "W" ),
		Text( Center Justified, {96, 50}, "E" )
		
	)
);
Jim
Jeff_Perkinson
Community Manager Community Manager

Re: Wind Rose for Wind Speed and Direction

It looks similar to a Coxcomb plot that you can get using the Pie element in Graph Builder.

-Jeff
7 REPLIES 7
txnelson
Super User

Re: Wind Rose for Wind Speed and Direction

There isn't a builtin chart that will produce the Wind Rose chart, however, a JMP Script could be written to produce such a chart.

Jim
0 Kudos
terapin
Community Trekker

Re: Wind Rose for Wind Speed and Direction

Didn't think there was a builtin chart yet,

 

I'm intrigued by your JSL idea.  But, I have no idea how to get started with something like this.  Can you steer me to an JSL example of something that shows me how something like this can be accomplished?

0 Kudos
Highlighted
txnelson
Super User

Re: Wind Rose for Wind Speed and Direction

Here is a sample script that is a real rough example of how you might start

wind rose.PNG

Names Default To Here( 1 );
nw = New Window( "Example",
	Graph Box(
		FrameSize( 600, 600 ),
		suppressAxes,
		Gradient Function( b, a, b, [0, 100], Z Color( [2, 9] ) ),
		Pen Color( "black" );
		Circle(
			{50, 50},
			15,
			30,
			45/* no fill for concentric circles */
		);
		xMat = [50, 95];
		yMat = [50, 50];
		Line( xMat, yMat );
		xMat = [50, 5];
		yMat = [50, 50];
		Line( xMat, yMat );
		xMat = [50, 50];
		yMat = [50, 95];
		Line( xMat, yMat );
		xMat = [50, 50];
		yMat = [50, 5];
		Line( xMat, yMat );
		xMat = [50, 81.8198051533946];
		yMat = [50, 81.8198051533946];
		Line( xMat, yMat );
		xMat = [50, 18.1801948466054];
		yMat = [50, 81.8198051533946];
		Line( xMat, yMat );
		xMat = [50, 81.8198051533946];
		yMat = [50, 18.1801948466054];
		Line( xMat, yMat );
		xMat = [50, 18.1801948466054];
		yMat = [50, 18.1801948466054];
		Line( xMat, yMat );
		xMat = [50, 91.8];
		yMat = [50, 67.];
		Line( xMat, yMat );
		xMat = [50, 8.2];
		yMat = [50, 67.];
		Line( xMat, yMat );
		xMat = [50, 91.8];
		yMat = [50, 33.];
		Line( xMat, yMat );
		xMat = [50, 8.2];
		yMat = [50, 33.];
		Line( xMat, yMat );
		xMat = [50, 33];
		yMat = [50, 91.8];
		Line( xMat, yMat );
		xMat = [50, 33];
		yMat = [50, 8.2];
		Line( xMat, yMat );
		xMat = [50, 67];
		yMat = [50, 91.8];
		Line( xMat, yMat );
		xMat = [50, 67];
		yMat = [50, 8.2];
		Line( xMat, yMat );
		Fill Color( "cyan" );,
		Pie( 7, 93, 93, 7, 255, 285 ),
		Pie( 7, 93, 93, 7, 225, 255 ),
		Fill Color( "red" ),
		Pie( 17, 83, 83, 17, 225, 255 ),
		Text Color( "Black" ),
		Text Size( 16 ),
		Text( Center Justified, {50, 95}, "N" ),
		Text( Center Justified, {50, 1}, "S" ),
		Text( Center Justified, {3, 50}, "W" ),
		Text( Center Justified, {96, 50}, "E" )
		
	)
);
Jim
terapin
Community Trekker

Re: Wind Rose for Wind Speed and Direction

Thanks for this great example of how to use JSL to solve the issue.  I'll start playing around with it and see how I can get it working with my data.  

0 Kudos
Jeff_Perkinson
Community Manager Community Manager

Re: Wind Rose for Wind Speed and Direction

It looks similar to a Coxcomb plot that you can get using the Pie element in Graph Builder.

-Jeff
terapin
Community Trekker

Re: Wind Rose for Wind Speed and Direction

Thanks Jeff for the suggestion,

 

I didn't realize that was an option under Pie elements.  Cool option.

 

 

I'll play around with it some to see if I can get it to display data like a Wind Rose.

 

0 Kudos
yvesprairie
Community Trekker

Re: Wind Rose for Wind Speed and Direction

Let us know if you succeed, I was looking for precisely the same function a week ago!!

0 Kudos