| plot_stim | R Documentation |
Show all the stimuli in a grid. You can use plot() as an alias.
plot_stim(
stimuli,
nrow = NULL,
ncol = NULL,
byrow = TRUE,
padding = 10,
external_pad = TRUE,
fill = wm_opts("fill"),
maxwidth = wm_opts("plot.maxwidth"),
maxheight = wm_opts("plot.maxheight")
)
stimuli |
list of class stimlist |
nrow |
number of rows |
ncol |
number of columns |
byrow |
fill grid by rows (first ncol images in the first row); if FALSE, fills by columns (first nrow images in the first column) |
padding |
around each image in pixels |
external_pad |
whether to include external padding |
fill |
background color, see |
maxwidth, maxheight |
maximum width and height of grid in pixels |
stimlist with the plot image (no templates)
Visualisation functions
as_ggplot(),
draw_tem(),
gglabel(),
label(),
mlabel(),
plot.stimlist(),
plot.stim(),
plot_rows()
stimuli <- demo_stim() |> resize(0.5) plot_stim(stimuli) # default padding is 10px internal and external plot(stimuli, fill = "dodgerblue") plot(stimuli, external_pad = 0, fill = "dodgerblue") plot(stimuli, padding = 0, fill = "dodgerblue") # make 8 numbered images n <- blank(8, color = grDevices::cm.colors(8)) |> label(1:8, gravity = "center", size = 50) # 2 rows, allocating by row plot(n, nrow = 2) # 2 rows, allocating by column plot(n, nrow = 2, byrow = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.