## Close any previously open graphic devices
graphics.off()
## Load the data
data(fluxes)
## Set the point of origin
x=0;y=0
## Use wind direction, distance and distance from the tower to convert
## to cartesian co-ordinates
pol<-polar2cart(x,y,fluxes$x_90.,fluxes$wind_dir,as.deg=TRUE)
## Plot the distance from the tower
plot(pol,xlab='X (m)',ylab='Y (m)',pch=16,cex=0.6)
## Add also the tower point
points(0,0,col=2,pch=16,cex=1.2)
Run the code above in your browser using DataLab