createPolygons: Create a data set of polygons for a set of letters from a...

Description Usage Arguments Value Examples

View source: R/alphabet.r

Description

Create a data set of polygons for a set of letters from a specified fontfamily

Usage

1
createPolygons(letters, font, fontsize = 400, dim = c(720, 720), scale = FALSE)

Arguments

letters

set of characters for which polygons are to be created

font

character describing the name of a font - use fonts() from package extrafont to check on available fonts

fontsize

size of letter to be created - larger means higher resolution, but also bigger result sets

dim

dimensions of the box in which the created letter is supposed to fit

scale

scale the values along the y axis to use result in geom_logo

Value

data set compatible to work with geom_logo

Examples

1
2
3
4
5
# check that all letters and digits are nicely shaped:
new_alphabet <- createPolygons(c("f", "g", "W", "*"), font="Garamond")

library(ggplot2)
qplot(x,y, geom="polygon", data=new_alphabet, facets=~group)

gglogo documentation built on Jan. 29, 2020, 1:09 a.m.