# Basics:
plot_icons(N = 1000) # icon array with default settings (arr_type = "array")
plot_icons(arr_type = "shuffledarray", N = 1000) # icon array with shuffled IDs
# Sampling:
plot_icons(N = 1000, prev = 1/2, sens = 2/3, spec = 6/7, sample = TRUE)
# array types:
plot_icons(arr_type = "mosaic", N = 1000) # areas as in mosaic plot
plot_icons(arr_type = "fillequal", N = 1000) # areas of equal size (probability as density)
plot_icons(arr_type = "fillleft", N = 1000) # icons filled from left to right (in columns)
plot_icons(arr_type = "filltop", N = 1000) # icons filled from top to bottom (in rows)
plot_icons(arr_type = "scatter", N = 1000) # icons randomly scattered
# by:
plot_icons(N = 1000, by = "all") # hi, mi, fa, cr (TP, FN, FP, TN) cases
plot_icons(N = 1000, by = "cd", main = "Cases by condition") # (hi + mi) vs. (fa + cr)
plot_icons(N = 1000, by = "dc", main = "Cases by decision") # (hi + fa) vs. (mi + cr)
plot_icons(N = 1000, by = "ac", main = "Cases by accuracy") # (hi + cr) vs. (fa + mi)
# Custom icon types and colors:
plot_icons(N = 800, arr_type = "array", icon_types = c(21, 22, 23, 24),
block_d = 0.5, border_d = 0.5, col_pal = pal_vir)
plot_icons(N = 800, arr_type = "shuffledarray", icon_types = c(21, 23, 24, 22),
block_d = 0.5, border_d = 0.5)
plot_icons(N = 800, arr_type = "fillequal", icon_types = c(21, 22, 22, 21),
icon_brd_lwd = .5, cex = 1, cex_lbl = 1.1)
# Text and color options:
plot_icons(N = 1000, prev = .5, sens = .5, spec = .5, arr_type = "shuffledarray",
main = "My title", sub = NA, lbl_txt = txt_TF, col_pal = pal_vir, mar_notes = TRUE)
plot_icons(N = 1000, prev = .5, sens = .5, spec = .5, arr_type = "shuffledarray",
main = "Green vs. red", col_pal = pal_rgb, transparency = .5)
Run the code above in your browser using DataLab