geom_strata_label: Returns ggplot layer for population data with labels

Description Usage Arguments Author(s) Examples

View source: R/geom_strata_label.R

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

1

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(ggplot2)
data(arapat)
ggplot() + 
  geom_strata_label( aes(x=Longitude, 
                         y=Latitude,
                         stratum=Population), data=arapat) + 
  coord_equal()
library(ggmap)
coords <- strata_coordinates( arapat )
map <- population_map( coords ) 
ggmap( map ) + geom_strata_label( data=arapat ) 

MarianaLag/Mlag documentation built on Feb. 13, 2020, 12:30 a.m.