hand_text: Text with 'handwritten' font

Description Usage Arguments Value Examples

Description

Works like the text command, but chooses a hand writing styled font. Also, parameter order is changed so that the text label comes first - useful for pipelining with %>%.

Usage

1
2
hand_text(txt,x,y,fontfam='am',,...)
txt %>% hand_text(x,y,fontfam='am',...)

Arguments

x

x coordinate of text location

y

y coordinate of text location - if missing, loks in x for both coordinates

fontfam

Handwritten font family - see get_fonts

...

other parameters passed on to the text function

txt

a character string to write as the title

Value

No value returned

Examples

1
2
3
4
5
6
7
8
# Here make_canvas is inserted in a pipeline after a simplified and tidied 
# map of Irish NUTS3 regions is created.  A sketchy rendition is then added to the
# canvas.
get_fonts()
data(RA) 
RA.spdf %>% small_chop %>% gSimplify(tol=11000) %>% tidy_it %>% make_canvas %>% sketch_it(col='lightgrey',lwd=0.5)
RA.spdf %>% coordinates -> label_points
RA.spdf$NUTS3NAME %>% hand_text(label_points,col='darkred',fontfam='pm',cex=0.7)

chrisbrunsdon/caricRture documentation built on May 13, 2019, 6:52 p.m.