- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Wind Rose for Wind Speed and Direction
Here is a sample script that is a real rough example of how you might start
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" )
)
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Wind Rose for Wind Speed and Direction
Here is a sample script that is a real rough example of how you might start
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" )
)
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Wind Rose for Wind Speed and Direction
hello nelson,
help me understand this script,
where is the actual input data? xMat/Ymat represent the wind speed or direction?
anyway i can adapt this script to take input from a csv file?
regards
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Wind Rose for Wind Speed and Direction
Except for the "Pie()" functions, everything else are graphics commands to create the N, S, E, W map. The expectation would be that one would read in the data from your JMP or Excel file, calculate required Pie() values from the input data, and then add them to the chart. The definition of the Pie() function along with examples, can be found in the Scripting Index. Not knowing what your data are, I cannot really guide you on what it will take to go from your input data to the parameters required for the Pie() function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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!!