Analemma graphs

December 27, 2013
By

(This article was first published on Dan Kelley Blog/R, and kindly contributed to R-bloggers)

Continuing on the theme of solar angles, the code given below produces an analemma diagram similar to that of Lynch (2012, figure 2).

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(oce)
loc <- list(lon=-0.0015, lat=51.4778)  # Greenwich Observatory
t <- seq.POSIXt(as.POSIXct("2014-01-01 12:00:00", tz="UTC"),
                as.POSIXct("2015-01-01 12:00:00", tz="UTC"),
                by="1 d")
sa <- sunAngle(t, lon=loc$lon, lat=loc$lat)
par(mar=c(3, 3, 1, 1), mgp=c(2, 0.7, 0)) # tighten margins
plot(sa$azimuth, sa$altitude, type='p', pch=20,
     xlab="Azimuth", ylab="Altitude")
grid()

graph

References

Peter Lynch, 2012. The equation of time and the analemma. Irish Math. Soc. Bulletin, 69:47-56. PDF

To leave a comment for the author, please follow the link and comment on his blog: Dan Kelley Blog/R.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.