Description Usage Arguments Value Resources Examples
View source: R/plot_ggwaffle.R
Waffle Plot
1 | plot_ggwaffle(dp)
|
dp |
List of parameters
|
a ggplot waffle chart
Unicode table: https://unicode-table.com/de/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | ## Not run: plot_ggwaffel(dp)
## Not run:
dp = list(NULL)
dp$tab = tab
fplot = plot_ggwaffel(dp)
fplot
# -----------------------
library(emojifont)
library(mzfun)
tab1 = data.table(
group = 'Chart 1',
segment = c('A', 'B', 'C'),
frequ = c(12, 13, 14),
color = c('blue', 'green', 'grey'),
label= fontawesome('fa-car'),
family='fontawesome-webfont',
label2 = emoji('airplane'),
family2 ='EmojiOne'
)
tab2 = data.table(
group = 'Chart 2',
segment = c('A', 'B', 'C'),
frequ = c(15, 16, 17),
color = c('blue', 'green', 'grey'),
label= fontawesome('fa-twitter'),
family='fontawesome-webfont',
label2 = emoji('airplane'),
family2 ='EmojiOne'
)
tab3 = rbind(tab1, tab2)
dp = list(NULL)
dp$tab = tab3
dp$key_frequ = 'frequ'
dp$key_group = 'segment'
dp$key_facet = 'group'
dp$key_color = 'color'
dp$key_label = 'label'
dp$key_family = 'family'
#dp$label = fontawesome('fa-female')
#dp$family ='fontawesome-webfont'
#dp$label = 'a'
dp$size = 15
dp$cols = 4
dp$orientation = 'horizontal'
#dp$color = c('grey', 'black')
dp$facet_ncol = 1
dp$align = 'center'
dp$legend = 'label'
dp$facet_title_position = 'top'
dp$font = 'serif'
dp$facet_margin = 2
fplot = plot_ggwaffle(dp)
fplot
# ------------------------
dp$key_label = 'label2'
dp$key_family = 'family2'
fplot = plot_ggwaffle(dp)
fplot
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.