Title: | Plots 'D&D'-Style Alignment Charts |
---|---|
Description: | 'D&D' alignment charts show 9 boxes with values for good through evil and values for chaotic through lawful. This package easily creates these alignment charts from user-provided image paths and alignment values. |
Authors: | Afton Coombs [aut, cre, cph], Tan Ho [ctb] |
Maintainer: | Afton Coombs <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.0.1 |
Built: | 2024-11-09 03:52:56 UTC |
Source: | https://github.com/aftonsteps/ggalignment |
A vector of possible alignment values.
alignment_vals
alignment_vals
A data.frame vector containing 1 column of 9 elements, each one a possible alignment
the nine possible alignments
https://dungeonsdragons.fandom.com/wiki/Alignment
Creates cat data with alignments for use in examples
example_cats()
example_cats()
a data.frame containing example data for cats
example_cats()
example_cats()
The primary function of the package, this function creates a D&D alignment chart from a dataframe with img, x, and y columns!
ggalignment( alignment, line_type = "dashed", line_color = "black", font_family = NULL, font_color = "black", font_size = NULL, background_color = "white", background_border = NA, max_images_per_dim = 2, max_image_dim = "width" )
ggalignment( alignment, line_type = "dashed", line_color = "black", font_family = NULL, font_color = "black", font_size = NULL, background_color = "white", background_border = NA, max_images_per_dim = 2, max_image_dim = "width" )
alignment |
a data.frame containing the data to be plotted, requiring
columns |
line_type |
the linetype for the box borders, which follows the ggplot2 allowable values for linetype for geom_rect() (e.g. blank, solid, dashed, dotted, dotdash, longdash, twodash) |
line_color |
the color for the bounding boxes of the alignments, defaults to black, and must be a named color such as "black" |
font_family |
the font family to be used on the alignment labels |
font_color |
the font color to be used on the alignment labels |
font_size |
the size of the font used on the alignment labels |
background_color |
the background color for the entire plot, defaults to white and must be a named color such as "white" |
background_border |
the color of the solid-line bounding box on the entire plot, defaults to NA and must be either NA or a named color such as "black" |
max_images_per_dim |
numeric representing the number of images that should fit in a single fact – for example, if you want an image to take up half the width of the fact, use max_images_per_dim = 2 |
max_image_dim |
one of "width" or "height", representing if the max_images_per_dim should count by width or height in the facet |
a ggplot containing the alignment chart
align_cats <- example_cats() ggalignment(alignment = align_cats)
align_cats <- example_cats() ggalignment(alignment = align_cats)