import_humanitarian_icons: Import Humanitarian icons v2 for use in charts

Description Usage Details Note Examples

Description

Humanitarian icons v2 are made by OCHA visual unit

Usage

1

Details

There is an option ochathemes.loadfonts which – if set to TRUE – will call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript devices. If you are running under Windows, the package calls the same function to register non-core fonts with the Windows graphics device.

Note

This will take care of ensuring PDF/PostScript usage. The location of the font directory is displayed after the base import is complete. It is highly recommended that you install them on your system the same way you would any other font you wish to use in other programs.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
import_humanitarian_icons()

library(ggplot2)
library(humicons)

ggplot(mtcars, aes(mpg, wt)) +
    geom_text(family = font_hum, label = humicons("car"), size = 5)

## End(Not run)

mmusori/ochathemes documentation built on May 29, 2019, 8:36 a.m.