Type: Package
Title: Galactic and Equatorial Coordinate Implementation for 'ggplot2'
Version: 0.1.0
Description: 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.
License: MIT + file LICENSE
URL: https://uskovgs.github.io/ggsky/
BugReports: https://github.com/uskovgs/ggsky/issues
Imports: ggplot2, grid
Suggests: knitr, rmarkdown
VignetteBuilder: knitr
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.3.3
Collate: 'data.R' 'sky_utils.R' 'sky_projection.R' 'sky_segmentize.R' 'sky_grobs.R' 'coord_galactic.R' 'coord_equatorial.R' 'sky_scales.R'
Depends: R (≥ 3.5)
NeedsCompilation: no
Packaged: 2026-03-06 14:24:00 UTC; uskov
Author: Grigory Uskov ORCID iD [aut, cre, cph]
Maintainer: Grigory Uskov <uskov.russia@gmail.com>
Repository: CRAN
Date/Publication: 2026-03-10 21:10:09 UTC

ARTSS1-5 X-ray Source Catalog

Description

ARTSS1-5 X-ray Source Catalog

Usage

artss15

Format

data.frame

name

Source name.

raj

Right ascension in J2000, degrees.

de

Declination in J2000, degrees.

e_pos

Position uncertainty, arcseconds.

flux

Flux in 'erg/cm^2/s'.

e_flux

Flux uncertainty in 'erg/cm^2/s'.

c_name

Cross-identification name.

type

Source type.

z

Redshift.

l

Galactic longitude, degrees.

b

Galactic latitude, degrees.

Source

https://cdsarc.cds.unistra.fr/viz-bin/cat/J/A+A/687/A183 (bibcode: 2024A&A...687A.183S)


Equatorial Hammer Coordinate System

Description

Coordinate system for sky maps in equatorial coordinates using a Hammer-Aitoff projection.

Usage

coord_equatorial(
  clip = "on",
  label_offset_lon = 0.025,
  label_offset_lat = 0.035,
  munch_deg = 1,
  pad_top_pt = NULL,
  pad_bottom_pt = NULL,
  pad_left_pt = NULL,
  pad_right_pt = NULL,
  clip_on_boundaries = TRUE
)

Arguments

clip

Character scalar. Passed to 'ggplot2' coordinate clipping ('"on"' or '"off"').

label_offset_lon

Numeric scalar in npc units. Vertical offset for right-ascension labels relative to the equator.

label_offset_lat

Numeric scalar in npc units. Outward offset for declination labels relative to the projection outline.

munch_deg

Numeric scalar. Maximum angular step (in degrees) used to segment paths and polygon edges along great circles before projection.

pad_top_pt, pad_bottom_pt, pad_left_pt, pad_right_pt

Optional numeric scalars (points) used to reserve external space for axis text. 'NULL' enables automatic sizing.

clip_on_boundaries

Logical scalar. If 'TRUE', draws an outside mask so geoms are visually clipped to the projection boundary.

Value

A 'ggplot2' coordinate object (a 'ggproto' instance inheriting from 'CoordEquatorial') to be added to a plot.

Examples

library(ggplot2)

df <- data.frame(
  ra = c(0, 30, 60, 90, 120),
  dec = c(-20, -5, 10, 25, 15)
)

ggplot(df, aes(ra, dec)) +
  geom_path() +
  coord_equatorial() +
  scale_eq_ra(breaks = seq(0, 330, by = 30)) +
  scale_eq_dec(breaks = seq(-60, 60, by = 30))

Galactic Hammer Coordinate System

Description

Coordinate system for sky maps in galactic coordinates using a Hammer-Aitoff projection.

Usage

coord_galactic(
  clip = "on",
  label_offset_lon = 0.025,
  label_offset_lat = 0.035,
  munch_deg = 1,
  pad_top_pt = NULL,
  pad_bottom_pt = NULL,
  pad_left_pt = NULL,
  pad_right_pt = NULL,
  clip_on_boundaries = TRUE
)

Arguments

clip

Character scalar. Passed to 'ggplot2' coordinate clipping ('"on"' or '"off"').

label_offset_lon

Numeric scalar in npc units. Vertical offset for galactic-longitude labels relative to the equator.

label_offset_lat

Numeric scalar in npc units. Outward offset for galactic-latitude labels relative to the projection outline.

munch_deg

Numeric scalar. Maximum angular step (in degrees) used to segment paths and polygon edges along great circles before projection.

pad_top_pt, pad_bottom_pt, pad_left_pt, pad_right_pt

Optional numeric scalars (points) used to reserve external space for axis text. 'NULL' enables automatic sizing.

clip_on_boundaries

Logical scalar. If 'TRUE', draws an outside mask so geoms are visually clipped to the projection boundary.

Value

A 'ggplot2' coordinate object (a 'ggproto' instance inheriting from 'CoordGalactic') to be added to a plot.

Examples

library(ggplot2)

df <- data.frame(
  lon = c(0, 30, 60, 90, 120),
  lat = c(-20, -5, 10, 25, 15)
)

ggplot(df, aes(lon, lat)) +
  geom_path() +
  coord_galactic() +
  scale_gal_lon(breaks = seq(0, 330, by = 30)) +
  scale_gal_lat(breaks = seq(-60, 60, by = 30))

Celestial equator is the great circle with declination equal to 0 deg.

Description

Celestial equator is the great circle with declination equal to 0 deg.

Usage

equator

Format

data.frame

l

Galactic longitude, degrees.

b

Galactic latitude, degrees.

ra

Right ascension, degrees.

Source

https://en.wikipedia.org/wiki/Celestial_equator


Equatorial declination scale settings

Description

Equatorial declination scale settings

Usage

scale_eq_dec(breaks = ggplot2::waiver(), minor_breaks = ggplot2::waiver())

Arguments

breaks, minor_breaks

Break specification passed to 'coord_equatorial()'.

Value

An object consumed by 'ggplot_add()'.


Equatorial right-ascension scale settings

Description

Equatorial right-ascension scale settings

Usage

scale_eq_ra(breaks = ggplot2::waiver(), minor_breaks = ggplot2::waiver())

Arguments

breaks, minor_breaks

Break specification passed to 'coord_equatorial()'.

Value

An object consumed by 'ggplot_add()'.


Galactic latitude scale settings

Description

Galactic latitude scale settings

Usage

scale_gal_lat(breaks = ggplot2::waiver(), minor_breaks = ggplot2::waiver())

Arguments

breaks, minor_breaks

Break specification passed to 'coord_galactic()'.

Value

An object consumed by 'ggplot_add()'.


Galactic longitude scale settings

Description

Galactic longitude scale settings

Usage

scale_gal_lon(breaks = ggplot2::waiver(), minor_breaks = ggplot2::waiver())

Arguments

breaks, minor_breaks

Break specification passed to 'coord_galactic()'.

Value

An object consumed by 'ggplot_add()'.