geom_strata_label: Returns ggplot layer for population data with labels

View source: R/geom_strata_label.R

geom_strata_labelR Documentation

Returns ggplot layer for population data with labels

Description

This function takes a data.frame of population data and returns a geom_point() layer for plotting. You can also indicate shape and color attributes in the mapping (through aes) that will be carried through.

Usage

geom_strata_label(mapping = NULL, data = NULL, ...)

Arguments

mapping

The aesthetic mapping, this MUST have values for x, y, and stratum.

data

The data.frame from which the coordinates and other materials are to be pulled. This can be a dataframe from strata_coordinates or one with raw genotypes.

...

Other parameters submitted to geom_text_repel().

Author(s)

Rodney J. Dyer rjdyer@vcu.edu

Examples

library(ggplot2)
data(arapat)
ggplot() + 
  geom_strata_label( aes(x=Longitude, 
                         y=Latitude,
                         stratum=Population), data=arapat) + 
  coord_equal()
coords <- strata_coordinates( arapat )

dyerlab/gstudio documentation built on Feb. 2, 2024, 8:24 p.m.