as_ggplot | R Documentation |
Convert a stimulus or list of stimuli into a ggplot, which can be further used with ggplot functions.
as_ggplot(stimuli, ...)
stimuli |
list of stimuli |
... |
Additional arguments to pass to |
a ggplot object
Visualisation functions
draw_tem()
,
gglabel()
,
label()
,
mlabel()
,
plot.stimlist()
,
plot.stim()
,
plot_rows()
,
plot_stim()
stimuli <- demo_stim() gg <- as_ggplot(stimuli) # add to ggplot object; coordinates are pixels # (images are 500x500 each, plus 10px padding) gg + ggplot2::geom_vline(xintercept = 0, color = "red") + ggplot2::geom_vline(xintercept = 1030, color = "blue") + ggplot2::geom_hline(yintercept = 0, color = "green") + ggplot2::geom_hline(yintercept = 520, color = "purple") + ggplot2::annotate("point", x = 515, y = 260, size = 10) + ggplot2::labs( title = "This is a ggplot!", caption = "Made with webmorphR" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.