Create a keyboard layout ggplot
bare name of a user-supplied plotting function. See details.
overall scaling factor and unit, e.g. "2cm". See details.
The user-supplied function should take a single argument (name is not important, but e.g. letter) which filters the plot to just the relevant letter. It should return the ggplot object. See demo(random_walk).
The scale is a text string, e.g. "2cm" which will be separated into a numeric and text component. The numeric component will scale the plot, while the text component sets the units.
(invisibly) a gtable containing multiple grobs defining the keyboard plot.
1 2 3 4 5 6 7 8 9 10 11
## Not run: rw <- plot_keyboard(ggshape_random_walk) ggsave(rw, filename = "random.png", width = 16, height = 6) eng <- plot_keyboard(ggshape_english_usage) ggsave(eng, filename = "english.png", width = 16, height = 6) langs <- plot_keyboard(ggshape_lang_diffs) ggsave(langs, filename = "languages.png", width = 16, height = 6) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.