The feel for direction is lost, and also a discontinuity is created between 0 and 360. I would say the data is not as easy to understand in this presentation. The data is exactly the same, but now we have plotted speed (R) on the Y axis and direction (Theta) on the X axis of the scatter plot.
Datagraph polar code#
You can see all the details in the program code linked below.Ī simpler method would be to just plot the Wind Speed and and Wind Direction on the Y and X axes of a rectangular XY plot as suggested at the start of the article. In the data step for the graph, x and y are computed from R and Theta using the following formula. Text x=xl y=yl text=label / textattrs=(size=9) Vector x=x2 y=y2 / xorigin=x1 yorigin=y1 arrowheadshape=barbed Scatter x=x y=y / colorresponse=bc markerattrs=(symbol=circlefilled) Proc sgplot data=wind aspect=1.0 noborder Title 'BC Concentration by Wind Speed and Direction'
Here is the SAS 9.40 SGPLOT program for the graph. Note, I have not yet added the indicators for the Wind Speed in this graph. The directions are displayed using the N-S-E-W arrows, so understanding the information is easier. The BC concentration is displayed by a colored marker, and the gradient legend is displayed on the right to decode the values. In this graph I have transformed the data so that the direction (0-360 degrees) is mapped to a point around the circle, and the speed (0-25 mph) is mapped along the radius. The data has the concentration of BC by wind direction and Wind speed. There is no real sampled or measured information in the data. The data for this graph was simulated by me using some random and trigonometric functions. The graph on the right shows the (simulated) BC concentration by Wind Direction and Wind Speed. The same information can be better understood using a polar graph. Such a graph was recently discussed on the SAS Communities page. But the information may not very easy to understand in such a graph. The simple solution is to display the directional or time data on the X axis of a XY plot as shown further down in the article. Or, the data may be cyclic in nature, with information over time by weeks, or years. Often your data may contain directional information. There are many situations where it is beneficial to display the data using a polar graph.