Simple tools to draw sky maps in 'ggplot2' using galactic or equatorial coordinates. Includes custom coordinate systems, grid labels, and helpers for sky map breaks.
ggsky is an extension for ggplot2 to draw sky maps with:
coord_galactic())coord_equatorial())It includes custom coordinate systems and helper scales for longitude/latitude labels.
From GitHub:
remotes::install_github("uskovgs/ggsky")
library(ggplot2)
library(ggsky)
N <- 100
df1 <- data.frame(
x = runif(N, 0, 360),
y = runif(N, -90, 90)
)
ggplot(df1, aes(x, y)) +
geom_point() +
coord_galactic() +
labs(title = "Galactic coordinate system")
ggplot(df1, aes(x, y)) +
geom_point() +
labs(title = "Equatorial coordinate system") +
coord_equatorial()