coord_azimuth_zenith: An azimuth/zenith coordinate system

Description Usage Arguments Format Examples

Description

This coordinate system imagines that your data will be plotted on the bottom of a sphere, oriented such that 0 azimuth is at the positive x-axis, and 0 zenith is at the top of the bowl. Increasing azimuth is counterclockwise, and zenith angles that are more negative move to the center of the plot. Positive zenith angles are not relevant in this coordinate system, and are squished to zero with a warning. A more approachable coordinate system is coord_bearing_dip.

Usage

1
2
3
coord_azimuth_zenith(projection = c("stereographic", "orthographic"))

CoordAzimuthZenith

Arguments

projection

Use stereographic to look at the bottom of the sphere as if you are situated at the top of the sphere (probably what you want); use orthographic to look at the bottom of the sphere as if you were very far away from it.

Format

An object of class CoordAzimuthZenith (inherits from Coord, ggproto, gg) of length 16.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(ggplot2)

df <- data.frame(
  azimuth = seq(0, 4*pi, length.out = 40),
  zenith = seq(0, -pi / 2, length.out = 40)
)

ggplot(df, aes(azimuth, zenith)) +
  geom_path(col = "red") +
  geom_point(col = "blue") +
  coord_azimuth_zenith() +
  scale_x_continuous(
    breaks = radians(seq(0, 330, by = 30)),
    labels = degrees
  )

paleolimbot/ggstereo documentation built on May 16, 2019, 9:10 p.m.