mirror of
https://github.com/ryantimpe/brickr.git
synced 2025-12-30 18:29:58 -06:00
Major documentation and function name updates. Still more work to do.
This commit is contained in:
21
DESCRIPTION
21
DESCRIPTION
@@ -1,6 +1,6 @@
|
||||
Package: brickr
|
||||
Title: Tools to emulate the LEGO® System in R
|
||||
Version: 0.1.0.9009
|
||||
Version: 0.1.0.9011
|
||||
Authors@R:
|
||||
person(given = "Ryan",
|
||||
family = "Timpe",
|
||||
@@ -30,24 +30,21 @@ RoxygenNote: 6.1.1
|
||||
URL: https://github.com/ryantimpe/brickr
|
||||
BugReports: https://github.com/ryantimpe/brickr/issues
|
||||
Collate:
|
||||
'bricks_from.R'
|
||||
'bricks_from_data.R'
|
||||
'bricks-from-mosaic.R'
|
||||
'bricks-from-rayshader.R'
|
||||
'bricks-from-tables.R'
|
||||
'build-bricks.R'
|
||||
'collect_bricks.R'
|
||||
'build-mosaic.R'
|
||||
'collect-bricks.R'
|
||||
'colors-and-themes.R'
|
||||
'coord_brick.R'
|
||||
'draw_key.R'
|
||||
'coord-brick.R'
|
||||
'draw-key.R'
|
||||
'geom-brick-col.R'
|
||||
'geom-brick-point.R'
|
||||
'geom-brick-rect.R'
|
||||
'image-to-mosaic.R'
|
||||
'image-to-prep-mosaic.R'
|
||||
'piece_count.R'
|
||||
'resizing_text_grob.R'
|
||||
'scale_brick.R'
|
||||
'theme_brick.R'
|
||||
'piece-count.R'
|
||||
'scale-brick.R'
|
||||
'theme-brick.R'
|
||||
'utils-pipe.R'
|
||||
'view_image.R'
|
||||
VignetteBuilder: knitr
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# Generated by roxygen2: do not edit by hand
|
||||
|
||||
export("%>%")
|
||||
export(GeomBrick)
|
||||
export(bricks_from_coords)
|
||||
export(bricks_from_excel)
|
||||
export(bricks_from_mosaic)
|
||||
@@ -12,19 +11,13 @@ export(build_colors)
|
||||
export(build_instructions)
|
||||
export(build_mosaic)
|
||||
export(build_pieces)
|
||||
export(build_pieces_table)
|
||||
export(build_themes)
|
||||
export(collect_bricks)
|
||||
export(coord_brick)
|
||||
export(coord_brick_flip)
|
||||
export(draw_key_brick)
|
||||
export(geom_brick_col)
|
||||
export(geom_brick_point)
|
||||
export(geom_brick_rect)
|
||||
export(image_to_mosaic)
|
||||
export(image_to_scaled)
|
||||
export(resizingTextGrob)
|
||||
export(scale_fill_brick)
|
||||
export(scaled_to_colors)
|
||||
export(table_pieces)
|
||||
export(theme_brick)
|
||||
importFrom(magrittr,"%>%")
|
||||
|
||||
12
NEWS.md
12
NEWS.md
@@ -4,7 +4,7 @@
|
||||
|
||||
* **Breaking:** Data "lego_colors.rda" has been updated with more accurate RGB values and new `brickrID` numbers. This will impact previously created mosaics and 3D models.
|
||||
|
||||
**Mosaics**
|
||||
## Mosaics
|
||||
|
||||
* New rendering of mosaics in ggplot2. Includes embossed text with custom labels.
|
||||
* Color_palette allows option to choose brick colors by rarity. 'universal' (most common), 'generic', and 'special' (least common).
|
||||
@@ -13,7 +13,7 @@
|
||||
* Updated brick collection algorithm to allow for custom brick input.
|
||||
* 3D mosaics have been rewritten as 3D models using plates with `bricks_from_mosaic()`.
|
||||
|
||||
**3D Models**
|
||||
## 3D Models
|
||||
|
||||
* `brick_res` input options to render models in higher definition ('sd', 'hd', 'uhd')
|
||||
* `bricks_from_rayshader()` to render LEGO models from rayshader plot_3d() input.
|
||||
@@ -21,13 +21,13 @@
|
||||
* Updated brick collection algorithm to allow for custom brick input.
|
||||
* Updated brick collection algorithm staggers bricks over layer, though still prioritizes larger bricks.
|
||||
|
||||
**ggplot Extension**
|
||||
## ggplot Extension
|
||||
|
||||
* `geom_brick_col` for bar charts in the shape of bricks. Negative values are fine, but `position = stack` is not available.
|
||||
* `coord_brick` to prevent chart brick distortion. `coord_brick_flip` for horizontal bars.
|
||||
* `scale_fill_brick` and `theme_brick` for different LEGO color options.
|
||||
|
||||
### TO DO
|
||||
## TO DO
|
||||
|
||||
* ggplot - continuous scale
|
||||
|
||||
@@ -41,12 +41,12 @@
|
||||
- IRL
|
||||
* Website
|
||||
* Check() breaks at the size check
|
||||
* CRAN!
|
||||
|
||||
### TO DO for a future update
|
||||
## TO DO in the future
|
||||
|
||||
* Negative bricks are "underside"
|
||||
* bricks_from_models
|
||||
* CRAN!
|
||||
|
||||
----
|
||||
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
#' Convert image output from scale_image() to bricks
|
||||
#' Convert a 2D LEGO mosaic into a brickr 3D object
|
||||
#'
|
||||
#' @param image_list List output from collect_bricks() or image_to_bricks(). Contains an element \code{Img_lego}.
|
||||
#' @param mosaic_list List output from collect_bricks() or image_to_bricks(). Contains an element \code{Img_lego}.
|
||||
#' @param mosaic_height Number of layers in the 3D image.
|
||||
#' @param highest_el Brick height is determined by brightness of color. Use \code{highest_el = 'dark'} for darkest bricks to have \code{mosaic_height}.
|
||||
#' @return A list with elements \code{threed_elevation} and \code{threed_hillshade} to created 3D mosiacs with the \code{rayshader} package.
|
||||
#' @export
|
||||
#'
|
||||
bricks_from_mosaic <- function(image_list, mosaic_height = 6, highest_el = "light"){
|
||||
bricks_from_mosaic <- function(mosaic_list, mosaic_height = 6, highest_el = "light"){
|
||||
|
||||
#Get previous data
|
||||
in_list <- image_list
|
||||
|
||||
if(in_list$mosaic_type != "flat")stop("3D mosaics can only be generated with 'flat' mosaics. Set this input in the 'collect_bricks' function.")
|
||||
|
||||
in_list <- mosaic_list
|
||||
|
||||
BrickIDs <- in_list$ID_bricks
|
||||
img_lego <- in_list$Img_lego
|
||||
|
||||
img_sorted_by_lum <- image_list$Img_lego %>%
|
||||
img_sorted_by_lum <- mosaic_list$Img_lego %>%
|
||||
dplyr::left_join(lego_colors %>% dplyr::select(Lego_name = Color, lum), by = "Lego_name") %>%
|
||||
dplyr::mutate(Level = as.numeric(as.factor(cut(lum, mosaic_height)))) %>%
|
||||
dplyr::do(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#' Convert image output from scale_image() to bricks
|
||||
#' Build a brickr 3D object from rayshader hillshade & heightmap matrices
|
||||
#'
|
||||
#' @param hillshade Same as \code{rayshader::plot_3d()}. Hillshade/image to be added to 3D surface map.
|
||||
#' @param heightmap Same as \code{rayshader::plot_3d()}. A two-dimensional matrix, where each entry in the matrix is the elevation at that point. All points are assumed to be evenly spaced.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#' Convert a data frame in 3D matrix format into bricks for 3D Model
|
||||
#' Convert a matrix table into a brickr 3D object
|
||||
#'
|
||||
#' @param matrix_table A data frame of a 3D brick model desigh. Left-most column is level/height/z dimension, with rows as Y axis and columns as X axis. See example. Use \code{tribble} for ease.
|
||||
#' @param color_guide A data frame linking numeric \code{.value} in \code{matrix_table} to official LEGO color names. Defaults to data frame 'lego_colors'.
|
||||
@@ -102,7 +102,7 @@ bricks_from_table <- function(matrix_table, color_guide = lego_colors, .re_level
|
||||
)
|
||||
}
|
||||
|
||||
#' Convert an Excel {brickr} template into a 3D model. https://github.com/ryantimpe/brickr_toybox
|
||||
#' Convert an Excel {brickr} template into a brickr 3D object
|
||||
#' @param excel_table Sheet imported from a brickr Excel template to build model. Contains stud placement and colors.
|
||||
#' @param repeat_levels How many times to repeat a level. Can save time in model planning. Default is 1.
|
||||
#' @inheritParams bricks_from_table
|
||||
@@ -153,7 +153,7 @@ bricks_from_excel <- function(excel_table, repeat_levels = 1,
|
||||
return(brickr_out)
|
||||
}
|
||||
|
||||
#' Convert a data frame with x, y, & z coordinates & Color into bricks for 3D Model
|
||||
#' Convert a data frame with x, y, z & Color columns into a brickr 3D object
|
||||
#'
|
||||
#' @param coord_table A data frame of a 3D brick model design. Contains x, y, and z (vertical height) dimensions, as well as Color from official LEGO color names. See \code{build_colors()}.
|
||||
#' @param increment_level Default '0'. Use in animations. Shift Level/z dimension by an integer.
|
||||
@@ -1,59 +0,0 @@
|
||||
###
|
||||
# Development of bricks_from_data()
|
||||
###
|
||||
# library(brickr)
|
||||
# dat_table <- PlantGrowth %>%
|
||||
# dplyr::group_by(group) %>%
|
||||
# dplyr::summarize_at(dplyr::vars(weight), mean) %>%
|
||||
# dplyr::ungroup()
|
||||
#
|
||||
# dat_table <- Titanic %>%
|
||||
# as.data.frame() %>%
|
||||
# dplyr::count(Class, wt = Freq)
|
||||
|
||||
|
||||
|
||||
bricks_from_data <- function(dat_table = dat_table, x, y, color,
|
||||
color_scale = lego_colors$Color[-1:-4],
|
||||
brick_value = 1){
|
||||
xvar <- rlang::enquo(x)
|
||||
yvar <- rlang::enquo(y)
|
||||
colorvar <- rlang::enquo(color)
|
||||
|
||||
dat_prep <- dat_table %>%
|
||||
#If X is a factor, convert to numeric. If not, convert to factor, then numeric
|
||||
dplyr::mutate(.value_x = as.numeric(as.factor(!!xvar))) %>%
|
||||
dplyr::mutate(.value_z = round(!!yvar / brick_value),
|
||||
.value_color1 = as.numeric(as.factor(!!colorvar))) %>%
|
||||
dplyr::do(if(color_scale[1] == "identity"){
|
||||
dplyr::mutate(., .value_color = !!colorvar)
|
||||
} else {
|
||||
dplyr::mutate(., .value_color = color_scale[.value_color1])
|
||||
})
|
||||
|
||||
|
||||
dat_bricks <- dat_prep %>%
|
||||
dplyr::mutate(x = .value_x * 6 + 1,
|
||||
z = .value_z,
|
||||
Color = .value_color) %>%
|
||||
#Duplicate over x... bars are 4-studs wide
|
||||
dplyr::bind_rows(list(
|
||||
dplyr::mutate(., x = x+1),
|
||||
dplyr::mutate(., x = x+2),
|
||||
dplyr::mutate(., x = x+3))) %>%
|
||||
#Duplicate over y
|
||||
dplyr::mutate(y = 3) %>%
|
||||
dplyr::bind_rows(dplyr::mutate(., y = 4))
|
||||
|
||||
#Duplicate over Z
|
||||
dat_bricks2 <- 1:max(dat_bricks$z) %>%
|
||||
purrr::map_df(~dplyr::filter(dat_bricks, z >= .x) %>% dplyr::mutate(z=.x))
|
||||
|
||||
bricks <- bricks_from_coords(dat_bricks2)
|
||||
return(bricks)
|
||||
}
|
||||
#
|
||||
#
|
||||
# dat_table %>%
|
||||
# bricks_from_data(x = Class, y = n, color = Class, brick_value = 50) %>%
|
||||
# display_bricks()
|
||||
@@ -1,6 +1,6 @@
|
||||
#' Helper function to convert a level from a 3D model into a rayshader-friendly object.
|
||||
#' Display a brickr object as a 3D model
|
||||
#'
|
||||
#' @param brick_list List output from table_to_bricks(). Contains an element \code{Img_lego}.
|
||||
#' @param brick_list A 3D brickr object from a bricks_from_*() function..
|
||||
#' @param brick_type Type of brick to use. Default is 'brick'. Other option is 'plate', which is 1/3 the height of a brick.
|
||||
#' @param lev z-level of 3D model
|
||||
#' @param brick_res Resolution, expressed at number of pixels on one side of a 1x1 brick. Defaults to 'sd' (15px). Use 'hd' for 30px per brick, and 'uhd' for 60px.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#' Display 2D mosaic output as a plot image
|
||||
#' Display 2D LEGO mosaic as a plot image
|
||||
#'
|
||||
#' @param image_list List output from collect_bricks() or image_to_bricks(). Contains an element \code{Img_lego}.
|
||||
#' @param title Optional title to include above plotted mosaic.
|
||||
@@ -58,11 +58,7 @@ build_instructions <- function(image_list, num_steps=6) {
|
||||
}
|
||||
|
||||
#Ratio of the "pixels" is different for flat or stacked bricks
|
||||
if(type == "flat"){
|
||||
coord_ratio <- 1
|
||||
} else {
|
||||
coord_ratio <- 6/5
|
||||
}
|
||||
coord_ratio <- 1
|
||||
|
||||
1:num_steps %>%
|
||||
purrr::map(create_steps, num_steps) %>%
|
||||
@@ -1,11 +1,9 @@
|
||||
|
||||
#' Collect legoize image from individual bricks into grouped bricks.
|
||||
#' Consolidate 1x1 bricks into larger ones of the same color. Internal function.
|
||||
#'
|
||||
#' @param image_list List output from legoize(). Contains an element \code{Img_lego}.
|
||||
#' @param use_bricks Array of brick sizes to use in mosaic. Defaults to \code{c('4x2', '2x2', '3x1', '2x1', '1x1')}`.
|
||||
#' @return A list with element \code{Img_bricks} containing a data frame of the x- & y-coordinates, R, G, B channels, and brick ID. Other helper elements.
|
||||
#' @export
|
||||
#'
|
||||
|
||||
collect_bricks <- function(image_list, use_bricks = NULL){
|
||||
|
||||
in_list <- image_list
|
||||
@@ -1,6 +1,7 @@
|
||||
#' Available brick colors
|
||||
#' Dispaly available brick colors
|
||||
#'
|
||||
#' Generates a plot of available brick colors. Use .names_only = TRUE to get a list of color names.
|
||||
#'
|
||||
#' @param .names_only Return an array of the 41 brick color names. Does not plot.
|
||||
#' @return A table and ggplot of brick colors & ID numbers.
|
||||
#' @examples
|
||||
@@ -10,7 +11,7 @@
|
||||
#' #Print list of colors
|
||||
#' build_colors(TRUE)
|
||||
#' @export
|
||||
#'
|
||||
|
||||
build_colors <- function(.names_only = FALSE){
|
||||
if(.names_only){
|
||||
return(lego_colors$Color)
|
||||
@@ -33,7 +34,7 @@ build_colors <- function(.names_only = FALSE){
|
||||
|
||||
}
|
||||
|
||||
#' Available brick themes for scale_fill_brick()
|
||||
#' Display available brick themes for ggplot feature scale_fill_brick()
|
||||
#'
|
||||
#' Generates a plot of available brick themes.
|
||||
#' @param show_theme Defaults to "all". Pass an array of theme names to only plot a subset.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#' Cartesian coordinates for bricks
|
||||
#' Cartesian coordinates for bricks - ggplot2 extension
|
||||
#'
|
||||
#' A fixed scale coordinate system that ensures correct brick proportions are maintained regardless of device size.
|
||||
#' Use \code{coord_brick_flip()} for horizontal bars.
|
||||
@@ -17,7 +17,7 @@
|
||||
#' coord_brick_flip()
|
||||
#'
|
||||
#' @export
|
||||
#' @rdname coord_brick
|
||||
#' @rdname coord-brick
|
||||
coord_brick <- function(xlim = NULL, ylim = NULL, expand = TRUE, clip = "on") {
|
||||
ggproto(NULL, CoordBrick,
|
||||
limits = list(x = xlim, y = ylim),
|
||||
@@ -27,7 +27,7 @@ coord_brick <- function(xlim = NULL, ylim = NULL, expand = TRUE, clip = "on") {
|
||||
}
|
||||
|
||||
#' @export
|
||||
#' @rdname coord_brick
|
||||
#' @rdname coord-brick
|
||||
coord_brick_flip <- function(xlim = NULL, ylim = NULL, expand = TRUE, clip = "on") {
|
||||
ggproto(NULL, CoordBrickFlip,
|
||||
limits = list(x = xlim, y = ylim),
|
||||
@@ -1,4 +1,3 @@
|
||||
#' @export
|
||||
#' @rdname brickr-ggproto
|
||||
draw_key_brick <- function(data, params, size) {
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
#' ggplot2 Points, as Bricks
|
||||
#'
|
||||
#' `geom_point`, except points look like LEGO(R) studs
|
||||
#'
|
||||
#' @inheritParams ggplot2::geom_rect
|
||||
#' @export
|
||||
geom_brick_point <- function(mapping = NULL, data = NULL,
|
||||
stat = "identity", position = "identity",
|
||||
...,
|
||||
label = "LEGO", simplified_threshold = 24,
|
||||
size = 1, stud_scale = 6/5,
|
||||
linejoin = "mitre",
|
||||
na.rm = FALSE,
|
||||
show.legend = NA,
|
||||
inherit.aes = TRUE) {
|
||||
layer_stud <- layer(
|
||||
data = data,
|
||||
mapping = mapping,
|
||||
stat = stat,
|
||||
geom = GeomStud,
|
||||
position = position,
|
||||
show.legend = show.legend,
|
||||
inherit.aes = inherit.aes,
|
||||
params = list(
|
||||
stud_scale = stud_scale,
|
||||
nudge = c(0, 0),
|
||||
na.rm = na.rm,
|
||||
...
|
||||
)
|
||||
)
|
||||
|
||||
layer_knob_shadow <- layer(
|
||||
data = data,
|
||||
mapping = mapping,
|
||||
stat = stat,
|
||||
geom = GeomStud,
|
||||
position = position,
|
||||
show.legend = show.legend,
|
||||
inherit.aes = inherit.aes,
|
||||
params = list(
|
||||
stud_scale = stud_scale,
|
||||
nudge = c(0.08, -0.08),
|
||||
fill = "#333333",
|
||||
color = NA,
|
||||
alpha = 0.2,
|
||||
size = size * (5/8),
|
||||
na.rm = na.rm,
|
||||
...
|
||||
)
|
||||
)
|
||||
|
||||
layer_knob_base<- layer(
|
||||
data = data,
|
||||
mapping = mapping,
|
||||
stat = stat,
|
||||
geom = GeomStud,
|
||||
position = position,
|
||||
show.legend = show.legend,
|
||||
inherit.aes = inherit.aes,
|
||||
params = list(
|
||||
stud_scale = stud_scale,
|
||||
nudge = c(0, 0),
|
||||
size = size * (5/8),
|
||||
na.rm = na.rm,
|
||||
...
|
||||
)
|
||||
)
|
||||
|
||||
return(list(layer_stud, layer_knob_shadow, layer_knob_base))
|
||||
}
|
||||
|
||||
|
||||
#' @rdname brickr-ggproto
|
||||
GeomStud <- ggproto("GeomStud", Geom,
|
||||
required_aes = c("x", "y"),
|
||||
default_aes = aes(colour = "#333333", fill = "#B40000", size = 1, linetype = 1,
|
||||
alpha = NA),
|
||||
|
||||
draw_panel = function(data, panel_params, coord, na.rm = FALSE,
|
||||
stud_scale = 6/5, nudge = c(0,0)) {
|
||||
|
||||
coords <- coord$transform(data, panel_params)
|
||||
|
||||
#Size of stud is proportional to number of studs on single plot?
|
||||
n <- max(table(data$PANEL))
|
||||
diameter <- 1/(n^(stud_scale))
|
||||
|
||||
xn <- coords$x + (nudge[1])*diameter
|
||||
yn <- coords$y + (nudge[2])*diameter
|
||||
|
||||
ggplot2:::ggname("geom_brick_point",
|
||||
grid::circleGrob(
|
||||
xn, yn,
|
||||
r= diameter * (1/2) * coords$size,
|
||||
gp = grid::gpar(
|
||||
col = alpha(coords$colour, coords$alpha),
|
||||
fill = alpha(coords$fill, coords$alpha)
|
||||
)
|
||||
)
|
||||
)
|
||||
},
|
||||
|
||||
draw_key = draw_key_polygon
|
||||
)
|
||||
@@ -1,7 +1,11 @@
|
||||
#' ggplot2 Bar Charts as Bricks
|
||||
#'
|
||||
#' `geom_rect`, except bars look like LEGO(R) bricks.
|
||||
#'
|
||||
#' @inheritParams ggplot2::geom_rect
|
||||
#' @param label Character string to include as embossed text inside brick knobs. Maximum 6 characters.
|
||||
#' @param label_scale Scale text size of label as a percentage.
|
||||
#' @param simplified_threshold Maximum number of knobs on the plot before embossed label is suppressed.
|
||||
#' @param use_bricks Array of brick sizes to use in mosaic. Defaults to \code{c('4x2', '2x2', '3x1', '2x1', '1x1')}`.
|
||||
#' @export
|
||||
geom_brick_rect <- function(mapping = NULL, data = NULL,
|
||||
stat = "identity", position = "identity",
|
||||
@@ -41,7 +45,6 @@ geom_brick_rect <- function(mapping = NULL, data = NULL,
|
||||
#' @rdname brickr-ggproto
|
||||
#' @format NULL
|
||||
#' @usage NULL
|
||||
#' @export
|
||||
GeomBrick <- ggproto("GeomBrick", Geom,
|
||||
default_aes = aes(colour = "#333333", fill = "#B40000", size = 0.5, linetype = 1,
|
||||
alpha = NA, label = "brickr", label_scale = 1,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
#' Convert image raster array to a LEGO-esque mosaic. Wrapper function.
|
||||
#' Create a 2D LEGO mosaic from an image array
|
||||
#'
|
||||
#' @param img Image to convert into mosaic. Usually from \code{jpeg::readJPEG()} or \code{png::readPNG()}.
|
||||
#' @param img_size Size of output image in pixel, where one pixel = one 'brick'. Use a single value (e.g. \code{48}) for a square image with 48 pixels on each side.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#' Scale an image raster array to a small number of pixels. Process into a data frame.
|
||||
#' Scale an image raster array to a small number of pixels. Process into a data frame. Internal function.
|
||||
#'
|
||||
#' @param image A raster array from an image.
|
||||
#' @param img_size Size of output image in pixel, where one pixel = one 'brick'. Use a single value (e.g. \code{48}) for a square image with 48 pixels on each side.
|
||||
@@ -8,7 +8,6 @@
|
||||
#' @format NULL
|
||||
#' @usage NULL
|
||||
#' @return A list with element \code{Img_scaled} containing a data frame of the x- & y-coordinates, R, G, B channels, and hex color of each brick (pixel).
|
||||
#' @export
|
||||
#'
|
||||
image_to_scaled <- function(image, img_size = 48, brightness = 1, warhol = 1:3){
|
||||
|
||||
@@ -95,7 +94,6 @@ image_to_scaled <- function(image, img_size = 48, brightness = 1, warhol = 1:3){
|
||||
#' @format NULL
|
||||
#' @usage NULL
|
||||
#' @return A list with element \code{Img_lego} containing a data frame of the x- & y-coordinates, R, G, B channels, and mapped color of each brick (pixel).
|
||||
#' @export
|
||||
scaled_to_colors <- function(image_list, method = "cie94",
|
||||
color_table = NULL,
|
||||
color_palette = c("universal", "generic", "special"),
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#' @export
|
||||
#'
|
||||
|
||||
table_pieces <- function(image_list){
|
||||
build_pieces_table <- function(image_list){
|
||||
pcs <- image_list$pieces
|
||||
|
||||
pcs %>%
|
||||
@@ -49,14 +49,9 @@ build_pieces <- function(image_list){
|
||||
"White"))) %>%
|
||||
dplyr::left_join(pcs_coords, by = "Brick_size")
|
||||
|
||||
if(in_list$mosaic_type == "flat"){
|
||||
coord_xlim <- c(-0.5, 10)
|
||||
facet_cols <- 5
|
||||
} else {
|
||||
coord_xlim <- c(-0.5, 9)
|
||||
facet_cols <- 6
|
||||
}
|
||||
|
||||
|
||||
pcs2 %>%
|
||||
ggplot2::ggplot() +
|
||||
ggplot2::geom_rect(ggplot2::aes(xmin=xmin, xmax=xmax, ymin=-ymin, ymax=-ymax,
|
||||
@@ -1,28 +0,0 @@
|
||||
#' grob for scaleable text size in geom_brick_*()
|
||||
#'
|
||||
#' @rdname brickr-ggproto
|
||||
#' @export
|
||||
#'
|
||||
|
||||
resizingTextGrob <- function(...) {
|
||||
# https://ryouready.wordpress.com/2012/08/01/creating-a-text-grob-that-automatically-adjusts-to-viewport-size/
|
||||
|
||||
grid::grob(tg=grid::textGrob(...), cl="resizingTextGrob")
|
||||
}
|
||||
|
||||
#' @rdname brickr-ggproto
|
||||
drawDetails.resizingTextGrob <- function(x, recording=TRUE){
|
||||
grid::grid.draw(x$tg)
|
||||
}
|
||||
|
||||
#' @rdname brickr-ggproto
|
||||
preDrawDetails.resizingTextGrob <- function(x){
|
||||
w <- grid::convertWidth(unit(1, "snpc"), "mm", valueOnly=TRUE)
|
||||
fs <- scales::rescale(w, to=c(20, 7), from=c(120, 20))
|
||||
grid::pushViewport(grid::viewport(gp = grid::gpar(fontsize = fs)))
|
||||
}
|
||||
|
||||
#' @rdname brickr-ggproto
|
||||
postDrawDetails.resizingTextGrob <- function(x){
|
||||
grid::popViewport()
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
#' Color scales for bricks
|
||||
#' Color scales for bricks - ggplot2 extension
|
||||
#'
|
||||
#' brickr counterpart to \code{ggplot2::scale_fill_discrete()} to map bar colors to the palette of LEGO mold colors.
|
||||
#'
|
||||
@@ -6,7 +6,7 @@
|
||||
#' @param brick_theme Color palette for bricks. Same as \code{brickr::theme_brick()}. Options include:
|
||||
#' \code{ c("classic", "hp", "sw_light", "sw_dark", "friends", "elves",
|
||||
#' "ninja", "classy", "city", "ocean", "movie", "space",
|
||||
#' "jurassic", "duplo", "superhero",
|
||||
#' "jurassic", "duplo", "superhero", "80s",
|
||||
#' "rainbow7", "rainbow13", "doublerainbow", "blue")}.
|
||||
#' @examples
|
||||
#' df <- data.frame(trt = c("a", "b", "c"), outcome = c(2.3, 1.9, 3.2))
|
||||
@@ -1,5 +1,10 @@
|
||||
#' Brick color themes
|
||||
|
||||
#' Brick color themes - ggplot2 extension
|
||||
#'
|
||||
#' @param brick_theme Color palette for bricks. Same as \code{brickr::theme_brick()}. Options include:
|
||||
#' \code{ c("classic", "hp", "sw_light", "sw_dark", "friends", "elves",
|
||||
#' "ninja", "classy", "city", "ocean", "movie", "space",
|
||||
#' "jurassic", "duplo", "superhero", "80s",
|
||||
#' "rainbow7", "rainbow13", "doublerainbow", "blue")}.
|
||||
#'@export
|
||||
|
||||
theme_brick <- function(brick_theme = "classic"){
|
||||
@@ -70,7 +70,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>MIT License • brickr</title>
|
||||
<title>GNU General Public License • brickr</title>
|
||||
|
||||
<!-- favicons -->
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
|
||||
|
||||
<meta property="og:title" content="MIT License" />
|
||||
<meta property="og:title" content="GNU General Public License" />
|
||||
|
||||
<meta property="og:image" content="/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
@@ -70,7 +70,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -121,15 +121,231 @@
|
||||
<div class="row">
|
||||
<div class="contents col-md-9">
|
||||
<div class="page-header">
|
||||
<h1>MIT License</h1>
|
||||
<h1>GNU General Public License</h1>
|
||||
</div>
|
||||
|
||||
<div id="mit-license" class="section level1">
|
||||
<div id="gnu-general-public-license" class="section level1">
|
||||
|
||||
<p>Copyright (c) 2019 Ryan Timpe</p>
|
||||
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
|
||||
<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
|
||||
<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
|
||||
<p><em>Version 3, 29 June 2007</em><br><em>Copyright © 2007 Free Software Foundation, Inc. <<a href="http://fsf.org/" class="uri">http://fsf.org/</a>></em></p>
|
||||
<p>Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.</p>
|
||||
<div id="preamble" class="section level2">
|
||||
<h2 class="hasAnchor">
|
||||
<a href="#preamble" class="anchor"></a>Preamble</h2>
|
||||
<p>The GNU General Public License is a free, copyleft license for software and other kinds of works.</p>
|
||||
<p>The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program–to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.</p>
|
||||
<p>When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.</p>
|
||||
<p>To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.</p>
|
||||
<p>For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.</p>
|
||||
<p>Developers that use the GNU GPL protect your rights with two steps: <strong>(1)</strong> assert copyright on the software, and <strong>(2)</strong> offer you this License giving you legal permission to copy, distribute and/or modify it.</p>
|
||||
<p>For the developers’ and authors’ protection, the GPL clearly explains that there is no warranty for this free software. For both users’ and authors’ sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.</p>
|
||||
<p>Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users’ freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.</p>
|
||||
<p>Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.</p>
|
||||
<p>The precise terms and conditions for copying, distribution and modification follow.</p>
|
||||
</div>
|
||||
<div id="terms-and-conditions" class="section level2">
|
||||
<h2 class="hasAnchor">
|
||||
<a href="#terms-and-conditions" class="anchor"></a>TERMS AND CONDITIONS</h2>
|
||||
<div id="0-definitions" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#0-definitions" class="anchor"></a>0. Definitions</h3>
|
||||
<p>“This License” refers to version 3 of the GNU General Public License.</p>
|
||||
<p>“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.</p>
|
||||
<p>“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.</p>
|
||||
<p>To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.</p>
|
||||
<p>A “covered work” means either the unmodified Program or a work based on the Program.</p>
|
||||
<p>To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.</p>
|
||||
<p>To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.</p>
|
||||
<p>An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that <strong>(1)</strong> displays an appropriate copyright notice, and <strong>(2)</strong> tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.</p>
|
||||
</div>
|
||||
<div id="1-source-code" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#1-source-code" class="anchor"></a>1. Source Code</h3>
|
||||
<p>The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.</p>
|
||||
<p>A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.</p>
|
||||
<p>The “System Libraries” of an executable work include anything, other than the work as a whole, that <strong>(a)</strong> is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and <strong>(b)</strong> serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.</p>
|
||||
<p>The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work’s System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.</p>
|
||||
<p>The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.</p>
|
||||
<p>The Corresponding Source for a work in source code form is that same work.</p>
|
||||
</div>
|
||||
<div id="2-basic-permissions" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#2-basic-permissions" class="anchor"></a>2. Basic Permissions</h3>
|
||||
<p>All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.</p>
|
||||
<p>You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.</p>
|
||||
<p>Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.</p>
|
||||
</div>
|
||||
<div id="3-protecting-users-legal-rights-from-anti-circumvention-law" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#3-protecting-users-legal-rights-from-anti-circumvention-law" class="anchor"></a>3. Protecting Users’ Legal Rights From Anti-Circumvention Law</h3>
|
||||
<p>No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.</p>
|
||||
<p>When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work’s users, your or third parties’ legal rights to forbid circumvention of technological measures.</p>
|
||||
</div>
|
||||
<div id="4-conveying-verbatim-copies" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#4-conveying-verbatim-copies" class="anchor"></a>4. Conveying Verbatim Copies</h3>
|
||||
<p>You may convey verbatim copies of the Program’s source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.</p>
|
||||
<p>You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.</p>
|
||||
</div>
|
||||
<div id="5-conveying-modified-source-versions" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#5-conveying-modified-source-versions" class="anchor"></a>5. Conveying Modified Source Versions</h3>
|
||||
<p>You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<strong>a)</strong> The work must carry prominent notices stating that you modified it, and giving a relevant date.</li>
|
||||
<li>
|
||||
<strong>b)</strong> The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.</li>
|
||||
<li>
|
||||
<strong>c)</strong> You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.</li>
|
||||
<li>
|
||||
<strong>d)</strong> If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.</li>
|
||||
</ul>
|
||||
<p>A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation’s users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.</p>
|
||||
</div>
|
||||
<div id="6-conveying-non-source-forms" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#6-conveying-non-source-forms" class="anchor"></a>6. Conveying Non-Source Forms</h3>
|
||||
<p>You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<strong>a)</strong> Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.</li>
|
||||
<li>
|
||||
<strong>b)</strong> Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either <strong>(1)</strong> a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or <strong>(2)</strong> access to copy the Corresponding Source from a network server at no charge.</li>
|
||||
<li>
|
||||
<strong>c)</strong> Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.</li>
|
||||
<li>
|
||||
<strong>d)</strong> Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.</li>
|
||||
<li>
|
||||
<strong>e)</strong> Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.</li>
|
||||
</ul>
|
||||
<p>A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.</p>
|
||||
<p>A “User Product” is either <strong>(1)</strong> a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or <strong>(2)</strong> anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.</p>
|
||||
<p>“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.</p>
|
||||
<p>If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).</p>
|
||||
<p>The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.</p>
|
||||
<p>Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.</p>
|
||||
</div>
|
||||
<div id="7-additional-terms" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#7-additional-terms" class="anchor"></a>7. Additional Terms</h3>
|
||||
<p>“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.</p>
|
||||
<p>When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.</p>
|
||||
<p>Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<strong>a)</strong> Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or</li>
|
||||
<li>
|
||||
<strong>b)</strong> Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or</li>
|
||||
<li>
|
||||
<strong>c)</strong> Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or</li>
|
||||
<li>
|
||||
<strong>d)</strong> Limiting the use for publicity purposes of names of licensors or authors of the material; or</li>
|
||||
<li>
|
||||
<strong>e)</strong> Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or</li>
|
||||
<li>
|
||||
<strong>f)</strong> Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.</li>
|
||||
</ul>
|
||||
<p>All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.</p>
|
||||
<p>If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.</p>
|
||||
<p>Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.</p>
|
||||
</div>
|
||||
<div id="8-termination" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#8-termination" class="anchor"></a>8. Termination</h3>
|
||||
<p>You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).</p>
|
||||
<p>However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated <strong>(a)</strong> provisionally, unless and until the copyright holder explicitly and finally terminates your license, and <strong>(b)</strong> permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.</p>
|
||||
<p>Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.</p>
|
||||
<p>Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.</p>
|
||||
</div>
|
||||
<div id="9-acceptance-not-required-for-having-copies" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#9-acceptance-not-required-for-having-copies" class="anchor"></a>9. Acceptance Not Required for Having Copies</h3>
|
||||
<p>You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.</p>
|
||||
</div>
|
||||
<div id="10-automatic-licensing-of-downstream-recipients" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#10-automatic-licensing-of-downstream-recipients" class="anchor"></a>10. Automatic Licensing of Downstream Recipients</h3>
|
||||
<p>Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.</p>
|
||||
<p>An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party’s predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.</p>
|
||||
<p>You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.</p>
|
||||
</div>
|
||||
<div id="11-patents" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#11-patents" class="anchor"></a>11. Patents</h3>
|
||||
<p>A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor’s “contributor version”.</p>
|
||||
<p>A contributor’s “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.</p>
|
||||
<p>Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor’s essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.</p>
|
||||
<p>In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.</p>
|
||||
<p>If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either <strong>(1)</strong> cause the Corresponding Source to be so available, or <strong>(2)</strong> arrange to deprive yourself of the benefit of the patent license for this particular work, or <strong>(3)</strong> arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient’s use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.</p>
|
||||
<p>If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.</p>
|
||||
<p>A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license <strong>(a)</strong> in connection with copies of the covered work conveyed by you (or copies made from those copies), or <strong>(b)</strong> primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.</p>
|
||||
<p>Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.</p>
|
||||
</div>
|
||||
<div id="12-no-surrender-of-others-freedom" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#12-no-surrender-of-others-freedom" class="anchor"></a>12. No Surrender of Others’ Freedom</h3>
|
||||
<p>If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.</p>
|
||||
</div>
|
||||
<div id="13-use-with-the-gnu-affero-general-public-license" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#13-use-with-the-gnu-affero-general-public-license" class="anchor"></a>13. Use with the GNU Affero General Public License</h3>
|
||||
<p>Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.</p>
|
||||
</div>
|
||||
<div id="14-revised-versions-of-this-license" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#14-revised-versions-of-this-license" class="anchor"></a>14. Revised Versions of this License</h3>
|
||||
<p>The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.</p>
|
||||
<p>Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.</p>
|
||||
<p>If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy’s public statement of acceptance of a version permanently authorizes you to choose that version for the Program.</p>
|
||||
<p>Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.</p>
|
||||
</div>
|
||||
<div id="15-disclaimer-of-warranty" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#15-disclaimer-of-warranty" class="anchor"></a>15. Disclaimer of Warranty</h3>
|
||||
<p>THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.</p>
|
||||
</div>
|
||||
<div id="16-limitation-of-liability" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#16-limitation-of-liability" class="anchor"></a>16. Limitation of Liability</h3>
|
||||
<p>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
|
||||
</div>
|
||||
<div id="17-interpretation-of-sections-15-and-16" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#17-interpretation-of-sections-15-and-16" class="anchor"></a>17. Interpretation of Sections 15 and 16</h3>
|
||||
<p>If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.</p>
|
||||
<p><em>END OF TERMS AND CONDITIONS</em></p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="how-to-apply-these-terms-to-your-new-programs" class="section level2">
|
||||
<h2 class="hasAnchor">
|
||||
<a href="#how-to-apply-these-terms-to-your-new-programs" class="anchor"></a>How to Apply These Terms to Your New Programs</h2>
|
||||
<p>If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.</p>
|
||||
<p>To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.</p>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode R"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1"><span class="op"><</span>one line to give the program<span class="st">'s name and a brief idea of what it does.></span></a>
|
||||
<a class="sourceLine" id="cb1-2" title="2"><span class="st">Copyright (C) 2019 Ryan Timpe</span></a>
|
||||
<a class="sourceLine" id="cb1-3" title="3"></a>
|
||||
<a class="sourceLine" id="cb1-4" title="4"><span class="st">This program is free software: you can redistribute it and/or modify</span></a>
|
||||
<a class="sourceLine" id="cb1-5" title="5"><span class="st">it under the terms of the GNU General Public License as published by</span></a>
|
||||
<a class="sourceLine" id="cb1-6" title="6"><span class="st">the Free Software Foundation, either version 3 of the License, or</span></a>
|
||||
<a class="sourceLine" id="cb1-7" title="7"><span class="st">(at your option) any later version.</span></a>
|
||||
<a class="sourceLine" id="cb1-8" title="8"></a>
|
||||
<a class="sourceLine" id="cb1-9" title="9"><span class="st">This program is distributed in the hope that it will be useful,</span></a>
|
||||
<a class="sourceLine" id="cb1-10" title="10"><span class="st">but WITHOUT ANY WARRANTY; without even the implied warranty of</span></a>
|
||||
<a class="sourceLine" id="cb1-11" title="11"><span class="st">MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></a>
|
||||
<a class="sourceLine" id="cb1-12" title="12"><span class="st">GNU General Public License for more details.</span></a>
|
||||
<a class="sourceLine" id="cb1-13" title="13"></a>
|
||||
<a class="sourceLine" id="cb1-14" title="14"><span class="st">You should have received a copy of the GNU General Public License</span></a>
|
||||
<a class="sourceLine" id="cb1-15" title="15"><span class="st">along with this program. If not, see <http://www.gnu.org/licenses/>.</span></a></code></pre></div>
|
||||
<p>Also add information on how to contact you by electronic and paper mail.</p>
|
||||
<p>If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:</p>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode R"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="1">brickr <span class="kw">Copyright</span> (C) <span class="dv">2019</span> Ryan Timpe</a>
|
||||
<a class="sourceLine" id="cb2-2" title="2">This program comes with ABSOLUTELY NO WARRANTY; <span class="cf">for</span> details type <span class="st">'show w'</span>.</a>
|
||||
<a class="sourceLine" id="cb2-3" title="3">This is free software, and you are welcome to redistribute it</a>
|
||||
<a class="sourceLine" id="cb2-4" title="4">under certain conditions; type <span class="st">'show c'</span> <span class="cf">for</span> details.</a></code></pre></div>
|
||||
<p>The hypothetical commands <code>show w</code> and <code>show c</code> should show the appropriate parts of the General Public License. Of course, your program’s commands might be different; for a GUI interface, you would use an “about box”.</p>
|
||||
<p>You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <<a href="http://www.gnu.org/licenses/" class="uri">http://www.gnu.org/licenses/</a>>.</p>
|
||||
<p>The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <<a href="http://www.gnu.org/philosophy/why-not-lgpl.html" class="uri">http://www.gnu.org/philosophy/why-not-lgpl.html</a>>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -106,12 +106,12 @@
|
||||
<a class="sourceLine" id="cb1-2" title="2"><span class="st"> </span><span class="kw"><a href="../reference/image_to_mosaic.html">image_to_mosaic</a></span>()</a>
|
||||
<a class="sourceLine" id="cb1-3" title="3"></a>
|
||||
<a class="sourceLine" id="cb1-4" title="4">mosaic <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/build_mosaic.html">build_mosaic</a></span>()</a></code></pre></div>
|
||||
<p><img src="mosaics_files/figure-html/g1-1.png" width="700"></p>
|
||||
<p><img src="../../../../OneDrive%20-%20LEGO/Documents/brickr/docs/articles/mosaics_files/figure-html/g1-1.png" width="700"></p>
|
||||
<p>The default is to create a mosaic with 48 knobs (brick studs) on each side. Change this using the <code>img_size</code> input. A single value will create a square mosaic, while an array of two values represent the width and length.</p>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="1">png<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/png/topics/readPNG">readPNG</a></span>(<span class="st">"../Images/mf_unicorn.PNG"</span>) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb2-2" title="2"><span class="st"> </span><span class="kw"><a href="../reference/image_to_mosaic.html">image_to_mosaic</a></span>(<span class="dt">img_size =</span> <span class="dv">32</span>) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb2-3" title="3"><span class="st"> </span><span class="kw"><a href="../reference/build_mosaic.html">build_mosaic</a></span>()</a></code></pre></div>
|
||||
<p><img src="mosaics_files/figure-html/g2-1.png" width="700"></p>
|
||||
<p><img src="../../../../OneDrive%20-%20LEGO/Documents/brickr/docs/articles/mosaics_files/figure-html/g2-1.png" width="700"></p>
|
||||
</div>
|
||||
<div id="colors" class="section level2">
|
||||
<h2 class="hasAnchor">
|
||||
@@ -144,7 +144,7 @@
|
||||
<a class="sourceLine" id="cb3-7" title="7"><span class="st"> </span><span class="kw"><a href="../reference/build_mosaic.html">build_mosaic</a></span>(<span class="dt">title =</span> <span class="st">"universal"</span>)</a>
|
||||
<a class="sourceLine" id="cb3-8" title="8"></a>
|
||||
<a class="sourceLine" id="cb3-9" title="9">gridExtra<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/gridExtra/topics/arrangeGrob">grid.arrange</a></span>(p1, p2, <span class="dt">layout_matrix =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/matrix">matrix</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="dv">1</span>,<span class="dv">2</span>), <span class="dt">ncol=</span><span class="dv">2</span>))</a></code></pre></div>
|
||||
<p><img src="mosaics_files/figure-html/c_palettes-1.png" width="576"></p>
|
||||
<p><img src="../../../../OneDrive%20-%20LEGO/Documents/brickr/docs/articles/mosaics_files/figure-html/c_palettes-1.png" width="576"></p>
|
||||
</div>
|
||||
<div id="grayscale" class="section level4">
|
||||
<h4 class="hasAnchor">
|
||||
@@ -153,7 +153,7 @@
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" title="1">png<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/png/topics/readPNG">readPNG</a></span>(<span class="st">"../Images/mf_unicorn.PNG"</span>) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb4-2" title="2"><span class="st"> </span><span class="kw"><a href="../reference/image_to_mosaic.html">image_to_mosaic</a></span>(<span class="dv">32</span>, <span class="dt">color_palette =</span> <span class="st">'bw'</span>, <span class="dt">contrast =</span> <span class="fl">1.1</span>)<span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb4-3" title="3"><span class="st"> </span><span class="kw"><a href="../reference/build_mosaic.html">build_mosaic</a></span>()</a></code></pre></div>
|
||||
<p><img src="mosaics_files/figure-html/c_bw-1.png" width="700"></p>
|
||||
<p><img src="../../../../OneDrive%20-%20LEGO/Documents/brickr/docs/articles/mosaics_files/figure-html/c_bw-1.png" width="700"></p>
|
||||
</div>
|
||||
<div id="custom-color-palettes" class="section level4">
|
||||
<h4 class="hasAnchor">
|
||||
@@ -166,7 +166,7 @@
|
||||
<a class="sourceLine" id="cb5-5" title="5">png<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/png/topics/readPNG">readPNG</a></span>(<span class="st">"../Images/mf_unicorn.PNG"</span>) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb5-6" title="6"><span class="st"> </span><span class="kw"><a href="../reference/image_to_mosaic.html">image_to_mosaic</a></span>(<span class="dv">32</span>, <span class="dt">color_table =</span> lego_colors_wo_blue)<span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb5-7" title="7"><span class="st"> </span><span class="kw"><a href="../reference/build_mosaic.html">build_mosaic</a></span>(<span class="dt">title =</span> <span class="st">"Mosaic without blue or azur"</span>)</a></code></pre></div>
|
||||
<p><img src="mosaics_files/figure-html/c_custom-1.png" width="700"></p>
|
||||
<p><img src="../../../../OneDrive%20-%20LEGO/Documents/brickr/docs/articles/mosaics_files/figure-html/c_custom-1.png" width="700"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="color-matching" class="section level3">
|
||||
@@ -180,7 +180,7 @@
|
||||
<a class="sourceLine" id="cb6-4" title="4"><span class="st"> </span><span class="kw"><a href="../reference/build_mosaic.html">build_mosaic</a></span>(<span class="dt">title =</span> .x )) -><span class="st"> </span>mosaics_by_method</a>
|
||||
<a class="sourceLine" id="cb6-5" title="5"></a>
|
||||
<a class="sourceLine" id="cb6-6" title="6">gridExtra<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/gridExtra/topics/arrangeGrob">grid.arrange</a></span>(<span class="dt">grobs =</span> mosaics_by_method, <span class="dt">layout_matrix =</span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/cbind">rbind</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="dv">1</span>,<span class="dv">2</span>),<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="dv">3</span>,<span class="dv">4</span>)))</a></code></pre></div>
|
||||
<p><img src="mosaics_files/figure-html/c_methods-1.png" width="480"></p>
|
||||
<p><img src="../../../../OneDrive%20-%20LEGO/Documents/brickr/docs/articles/mosaics_files/figure-html/c_methods-1.png" width="480"></p>
|
||||
</div>
|
||||
<div id="dithering" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
@@ -192,31 +192,26 @@
|
||||
<a class="sourceLine" id="cb7-4" title="4"><span class="st"> </span><span class="kw"><a href="../reference/build_mosaic.html">build_mosaic</a></span>(<span class="dt">title =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/paste">paste</a></span>(<span class="st">"dithering ="</span>, .x))) -><span class="st"> </span>mosaics_by_dither</a>
|
||||
<a class="sourceLine" id="cb7-5" title="5"></a>
|
||||
<a class="sourceLine" id="cb7-6" title="6">gridExtra<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/gridExtra/topics/arrangeGrob">grid.arrange</a></span>(<span class="dt">grobs =</span> mosaics_by_dither, <span class="dt">layout_matrix =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/matrix">matrix</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="dv">1</span>,<span class="dv">2</span>), <span class="dt">ncol=</span><span class="dv">2</span>))</a></code></pre></div>
|
||||
<p><img src="mosaics_files/figure-html/c_dither-1.png" width="576"></p>
|
||||
<p><img src="../../../../OneDrive%20-%20LEGO/Documents/brickr/docs/articles/mosaics_files/figure-html/c_dither-1.png" width="576"></p>
|
||||
</div>
|
||||
<div id="other-color-options" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#other-color-options" class="anchor"></a>Other color options</h3>
|
||||
<p>The input <code>brightness</code> can be used to scale up or down the RGB values of the image before color matching. The default is 1.</p>
|
||||
<p>Use the <code>warhol</code> input to swap the R, G, or B channels in the original image. This can be used to create pop-art style mosaics.</p>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" title="1">png<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/png/topics/readPNG">readPNG</a></span>(<span class="st">"../Images/mf_unicorn.PNG"</span>) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb8-2" title="2"><span class="st"> </span><span class="kw"><a href="../reference/image_to_mosaic.html">image_to_mosaic</a></span>(<span class="dv">32</span>, <span class="dt">brightness =</span> <span class="fl">0.9</span>, <span class="dt">warhol =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="dv">2</span>, <span class="dv">3</span>, <span class="dv">1</span>))<span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb8-3" title="3"><span class="st"> </span><span class="kw"><a href="../reference/build_mosaic.html">build_mosaic</a></span>()</a></code></pre></div>
|
||||
<p><img src="mosaics_files/figure-html/c_other-1.png" width="700"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="d-mosaics" class="section level2">
|
||||
<h2 class="hasAnchor">
|
||||
<a href="#d-mosaics" class="anchor"></a>3D Mosaics</h2>
|
||||
<p>With <a href="https://www.rayshader.com/">rayshader</a> installed, passing the mosaic object to <code><a href="../reference/bricks_from_mosaic.html">bricks_from_mosaic()</a></code> will render a 3D object, stacking layers of bricks on each other to create an elevated mosaic. By default, the lightest color bricks will be on top, but this can be changed using the <code>highest_el = 'dark'</code> option.</p>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb9-1" title="1">png<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/png/topics/readPNG">readPNG</a></span>(<span class="st">"../Images/mf_unicorn.PNG"</span>) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb9-2" title="2"><span class="st"> </span><span class="kw"><a href="../reference/image_to_mosaic.html">image_to_mosaic</a></span>(<span class="dv">32</span>) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb9-3" title="3"><span class="st"> </span><span class="kw"><a href="../reference/bricks_from_mosaic.html">bricks_from_mosaic</a></span>(<span class="dt">highest_el =</span> <span class="st">"dark"</span>) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb9-4" title="4"><span class="st"> </span><span class="kw"><a href="../reference/build_bricks.html">build_bricks</a></span>(<span class="dt">brick_type =</span> <span class="st">"plate"</span>)</a>
|
||||
<a class="sourceLine" id="cb9-5" title="5"></a>
|
||||
<a class="sourceLine" id="cb9-6" title="6">rayshader<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/rayshader/topics/render_camera">render_camera</a></span>(<span class="dt">theta =</span> <span class="dv">15</span>)</a>
|
||||
<a class="sourceLine" id="cb9-7" title="7">rayshader<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/rayshader/topics/render_snapshot">render_snapshot</a></span>(<span class="dt">clear =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
|
||||
<p><img src="mosaics_files/figure-html/c_threed-1.png" width="700"></p>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" title="1">png<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/png/topics/readPNG">readPNG</a></span>(<span class="st">"../Images/mf_unicorn.PNG"</span>) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb8-2" title="2"><span class="st"> </span><span class="kw"><a href="../reference/image_to_mosaic.html">image_to_mosaic</a></span>(<span class="dv">32</span>) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb8-3" title="3"><span class="st"> </span><span class="kw"><a href="../reference/bricks_from_mosaic.html">bricks_from_mosaic</a></span>(<span class="dt">highest_el =</span> <span class="st">"dark"</span>) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb8-4" title="4"><span class="st"> </span><span class="kw"><a href="../reference/build_bricks.html">build_bricks</a></span>(<span class="dt">brick_type =</span> <span class="st">"plate"</span>)</a>
|
||||
<a class="sourceLine" id="cb8-5" title="5"></a>
|
||||
<a class="sourceLine" id="cb8-6" title="6">rayshader<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/rayshader/topics/render_camera">render_camera</a></span>(<span class="dt">theta =</span> <span class="dv">15</span>)</a>
|
||||
<a class="sourceLine" id="cb8-7" title="7">rayshader<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/rayshader/topics/render_snapshot">render_snapshot</a></span>(<span class="dt">clear =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
|
||||
<p><img src="../../../../OneDrive%20-%20LEGO/Documents/brickr/docs/articles/mosaics_files/figure-html/c_threed-1.png" width="700"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
<a class="sourceLine" id="cb2-3" title="3"></a>
|
||||
<a class="sourceLine" id="cb2-4" title="4"><span class="co">#Plot 2D mosaic</span></a>
|
||||
<a class="sourceLine" id="cb2-5" title="5">mosaic1 <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="reference/build_mosaic.html">build_mosaic</a></span>()</a></code></pre></div>
|
||||
<p><img src="index_files/figure-html/m1_set-1.png" width="288"></p>
|
||||
<p><img src="../../../OneDrive%20-%20LEGO/Documents/brickr/docs/index_files/figure-html/m1_set-1.png" width="288"></p>
|
||||
<p>In general, any {brickr} function that begins with <code>build_</code> generates a graphical output from a {brickr} list object from other functions.</p>
|
||||
<div id="customization" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
@@ -170,7 +170,7 @@
|
||||
<a class="sourceLine" id="cb3-12" title="12"><span class="st"> </span><span class="kw"><a href="reference/build_bricks.html">build_bricks</a></span>(<span class="dt">brick_res =</span> <span class="st">"uhd"</span>)</a>
|
||||
<a class="sourceLine" id="cb3-13" title="13"></a>
|
||||
<a class="sourceLine" id="cb3-14" title="14">rayshader<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/rayshader/topics/render_snapshot">render_snapshot</a></span>()</a></code></pre></div>
|
||||
<p><img src="index_files/figure-html/bricks_1-1.png" width="288"></p>
|
||||
<p><img src="../../../OneDrive%20-%20LEGO/Documents/brickr/docs/index_files/figure-html/bricks_1-1.png" width="288"></p>
|
||||
<div id="stacking-bricks" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#stacking-bricks" class="anchor"></a>Stacking bricks</h3>
|
||||
@@ -211,7 +211,7 @@
|
||||
<a class="sourceLine" id="cb4-33" title="33"><span class="st"> </span><span class="kw"><a href="reference/build_bricks.html">build_bricks</a></span>(<span class="dt">theta =</span> <span class="dv">210</span>, <span class="dt">brick_res =</span> <span class="st">"hd"</span>)</a>
|
||||
<a class="sourceLine" id="cb4-34" title="34"></a>
|
||||
<a class="sourceLine" id="cb4-35" title="35">rayshader<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/rayshader/topics/render_snapshot">render_snapshot</a></span>()</a></code></pre></div>
|
||||
<p><img src="index_files/figure-html/bricks_5-1.png" width="384"></p>
|
||||
<p><img src="../../../OneDrive%20-%20LEGO/Documents/brickr/docs/index_files/figure-html/bricks_5-1.png" width="384"></p>
|
||||
</div>
|
||||
<div id="programmatically-build-models" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
@@ -238,7 +238,7 @@
|
||||
<a class="sourceLine" id="cb5-19" title="19"><span class="st"> </span><span class="kw"><a href="reference/build_bricks.html">build_bricks</a></span>(<span class="dt">phi =</span> <span class="dv">30</span>, <span class="dt">theta =</span> <span class="dv">30</span>)</a>
|
||||
<a class="sourceLine" id="cb5-20" title="20"></a>
|
||||
<a class="sourceLine" id="cb5-21" title="21">rayshader<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/rayshader/topics/render_snapshot">render_snapshot</a></span>()</a></code></pre></div>
|
||||
<p><img src="index_files/figure-html/bricks_6-1.png" width="480"></p>
|
||||
<p><img src="../../../OneDrive%20-%20LEGO/Documents/brickr/docs/index_files/figure-html/bricks_6-1.png" width="480"></p>
|
||||
</div>
|
||||
<div id="examples" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
@@ -265,9 +265,9 @@
|
||||
<a class="sourceLine" id="cb6-4" title="4"><span class="kw">ggplot</span>(df, <span class="kw">aes</span>(trt, outcome)) <span class="op">+</span></a>
|
||||
<a class="sourceLine" id="cb6-5" title="5"><span class="st"> </span><span class="kw"><a href="reference/geom_brick_col.html">geom_brick_col</a></span>(<span class="kw">aes</span>(<span class="dt">fill =</span> trt)) <span class="op">+</span></a>
|
||||
<a class="sourceLine" id="cb6-6" title="6"><span class="st"> </span><span class="kw"><a href="reference/scale_fill_brick.html">scale_fill_brick</a></span>() <span class="op">+</span></a>
|
||||
<a class="sourceLine" id="cb6-7" title="7"><span class="st"> </span><span class="kw"><a href="reference/coord_brick.html">coord_brick</a></span>() <span class="op">+</span></a>
|
||||
<a class="sourceLine" id="cb6-7" title="7"><span class="st"> </span><span class="kw"><a href="reference/coord-brick.html">coord_brick</a></span>() <span class="op">+</span></a>
|
||||
<a class="sourceLine" id="cb6-8" title="8"><span class="st"> </span><span class="kw"><a href="reference/theme_brick.html">theme_brick</a></span>()</a></code></pre></div>
|
||||
<p><img src="index_files/figure-html/geom_brick-1.png" width="384"></p>
|
||||
<p><img src="../../../OneDrive%20-%20LEGO/Documents/brickr/docs/index_files/figure-html/geom_brick-1.png" width="384"></p>
|
||||
<p>Both <code><a href="reference/scale_fill_brick.html">scale_fill_brick()</a></code> and <code><a href="reference/theme_brick.html">theme_brick()</a></code> take an input ‘brick_theme’, which ensures all colors match official LEGO brick colors. See <code><a href="reference/build_themes.html">build_themes()</a></code> for a sample of all available brick theme.</p>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" title="1">df <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/data.frame">data.frame</a></span>(<span class="dt">trt =</span> letters[<span class="dv">1</span><span class="op">:</span><span class="dv">6</span>], <span class="dt">outcome =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/stats/topics/Normal">rnorm</a></span>(<span class="dv">6</span>, <span class="dt">mean =</span> <span class="dv">5</span>, <span class="dt">sd =</span> <span class="dv">2</span>))</a>
|
||||
<a class="sourceLine" id="cb7-2" title="2"></a>
|
||||
@@ -276,10 +276,10 @@
|
||||
<a class="sourceLine" id="cb7-5" title="5"><span class="kw">ggplot</span>(df, <span class="kw">aes</span>(trt, outcome)) <span class="op">+</span></a>
|
||||
<a class="sourceLine" id="cb7-6" title="6"><span class="st"> </span><span class="kw"><a href="reference/geom_brick_col.html">geom_brick_col</a></span>(<span class="kw">aes</span>(<span class="dt">fill =</span> trt), <span class="dt">two_knob =</span> F) <span class="op">+</span></a>
|
||||
<a class="sourceLine" id="cb7-7" title="7"><span class="st"> </span><span class="kw"><a href="reference/scale_fill_brick.html">scale_fill_brick</a></span>(use_theme) <span class="op">+</span></a>
|
||||
<a class="sourceLine" id="cb7-8" title="8"><span class="st"> </span><span class="kw"><a href="reference/coord_brick.html">coord_brick_flip</a></span>() <span class="op">+</span></a>
|
||||
<a class="sourceLine" id="cb7-8" title="8"><span class="st"> </span><span class="kw"><a href="reference/coord-brick.html">coord_brick_flip</a></span>() <span class="op">+</span></a>
|
||||
<a class="sourceLine" id="cb7-9" title="9"><span class="st"> </span><span class="kw"><a href="reference/theme_brick.html">theme_brick</a></span>(use_theme) <span class="op">+</span></a>
|
||||
<a class="sourceLine" id="cb7-10" title="10"><span class="st"> </span><span class="kw">theme</span>(<span class="dt">legend.position =</span> <span class="st">"none"</span>)</a></code></pre></div>
|
||||
<p><img src="index_files/figure-html/geom_brick2-1.png" width="384"></p>
|
||||
<p><img src="../../../OneDrive%20-%20LEGO/Documents/brickr/docs/index_files/figure-html/geom_brick2-1.png" width="384"></p>
|
||||
</div>
|
||||
<div id="irl" class="section level2">
|
||||
<h2 class="hasAnchor">
|
||||
@@ -290,14 +290,14 @@
|
||||
<a href="#instructions" class="anchor"></a>Instructions</h3>
|
||||
<p>Use <code><a href="reference/build_instructions.html">build_instructions()</a></code> to break the mosaics and 3D models into easier-to-read steps for building the set. This defaults to 6 steps, but passing any integer value will generate that many steps.</p>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" title="1">mosaic1 <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="reference/build_instructions.html">build_instructions</a></span>(<span class="dv">9</span>)</a></code></pre></div>
|
||||
<p><img src="index_files/figure-html/m1_instructions-1.png" width="768"></p>
|
||||
<p><img src="../../../OneDrive%20-%20LEGO/Documents/brickr/docs/index_files/figure-html/m1_instructions-1.png" width="768"></p>
|
||||
</div>
|
||||
<div id="piece-list-and-count" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#piece-list-and-count" class="anchor"></a>Piece list and count</h3>
|
||||
<p>Use <code><a href="reference/build_pieces.html">build_pieces()</a></code> to generate a graphic and count of all required plates or bricks (for stacked mosaics). These are sorted by color and size for easy purchase on LEGO.com’s <a href="https://shop.lego.com/en-US/Pick-a-Brick">Pick-a-Brick</a> section using the advanced search option. Alternatively, use <code><a href="reference/table_pieces.html">table_pieces()</a></code> to produce a data frame table of all required bricks.</p>
|
||||
<p>Use <code><a href="reference/build_pieces.html">build_pieces()</a></code> to generate a graphic and count of all required plates or bricks (for stacked mosaics). These are sorted by color and size for easy purchase on LEGO.com’s <a href="https://shop.lego.com/en-US/Pick-a-Brick">Pick-a-Brick</a> section using the advanced search option. Alternatively, use <code>table_pieces()</code> to produce a data frame table of all required bricks.</p>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb9-1" title="1">mosaic1 <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="reference/build_pieces.html">build_pieces</a></span>()</a></code></pre></div>
|
||||
<p><img src="index_files/figure-html/m1_pieces-1.png" width="768"></p>
|
||||
<p><img src="../../../OneDrive%20-%20LEGO/Documents/brickr/docs/index_files/figure-html/m1_pieces-1.png" width="768"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -317,7 +317,7 @@
|
||||
<h2>License</h2>
|
||||
<ul class="list-unstyled">
|
||||
<li><a href="LICENSE.html">Full license</a></li>
|
||||
<li><small><a href="https://opensource.org/licenses/mit-license.php">MIT</a> + file <a href="LICENSE-text.html">LICENSE</a></small></li>
|
||||
<li><small><a href="https://www.r-project.org/Licenses/GPL-3">GPL-3</a></small></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="developers">
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 19 KiB |
@@ -70,7 +70,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -132,7 +132,9 @@
|
||||
<li><p><strong>Breaking:</strong> Pretty much <em>EVERY</em> function. Seriously, check out the README and start fresh.</p></li>
|
||||
<li><p><strong>Breaking:</strong> Data “lego_colors.rda” has been updated with more accurate RGB values and new <code>brickrID</code> numbers. This will impact previously created mosaics and 3D models.</p></li>
|
||||
</ul>
|
||||
<p><strong>Mosaics</strong></p>
|
||||
<div id="mosaics" class="section level2">
|
||||
<h2 class="hasAnchor">
|
||||
<a href="#mosaics" class="anchor"></a>Mosaics</h2>
|
||||
<ul>
|
||||
<li>New rendering of mosaics in ggplot2. Includes embossed text with custom labels.</li>
|
||||
<li>Color_palette allows option to choose brick colors by rarity. ‘universal’ (most common), ‘generic’, and ‘special’ (least common).</li>
|
||||
@@ -141,7 +143,10 @@
|
||||
<li>Updated brick collection algorithm to allow for custom brick input.</li>
|
||||
<li>3D mosaics have been rewritten as 3D models using plates with <code><a href="../reference/bricks_from_mosaic.html">bricks_from_mosaic()</a></code>.</li>
|
||||
</ul>
|
||||
<p><strong>3D Models</strong></p>
|
||||
</div>
|
||||
<div id="3d-models" class="section level2">
|
||||
<h2 class="hasAnchor">
|
||||
<a href="<a href='https://github.com/ryantimpe/brickr/issues/3'>#3</a>d-models" class="anchor"></a>3D Models</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<code>brick_res</code> input options to render models in higher definition (‘sd’, ‘hd’, ‘uhd’)</li>
|
||||
@@ -151,7 +156,10 @@
|
||||
<li>Updated brick collection algorithm to allow for custom brick input.</li>
|
||||
<li>Updated brick collection algorithm staggers bricks over layer, though still prioritizes larger bricks.</li>
|
||||
</ul>
|
||||
<p><strong>ggplot Extension</strong></p>
|
||||
</div>
|
||||
<div id="ggplot-extension" class="section level2">
|
||||
<h2 class="hasAnchor">
|
||||
<a href="#ggplot-extension" class="anchor"></a>ggplot Extension</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<code>geom_brick_col</code> for bar charts in the shape of bricks. Negative values are fine, but <code>position = stack</code> is not available.</li>
|
||||
@@ -160,9 +168,10 @@
|
||||
<li>
|
||||
<code>scale_fill_brick</code> and <code>theme_brick</code> for different LEGO color options.</li>
|
||||
</ul>
|
||||
<div id="to-do" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#to-do" class="anchor"></a>TO DO</h3>
|
||||
</div>
|
||||
<div id="to-do" class="section level2">
|
||||
<h2 class="hasAnchor">
|
||||
<a href="#to-do" class="anchor"></a>TO DO</h2>
|
||||
<ul>
|
||||
<li><p>ggplot - continuous scale</p></li>
|
||||
<li>3D model instructions… level by level</li>
|
||||
@@ -177,16 +186,16 @@
|
||||
</ul>
|
||||
</li>
|
||||
<li>Website</li>
|
||||
<li>Check() breaks at the size check</li>
|
||||
<li><p>CRAN!</p></li>
|
||||
<li><p>Check() breaks at the size check</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="to-do-for-a-future-update" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#to-do-for-a-future-update" class="anchor"></a>TO DO for a future update</h3>
|
||||
<div id="to-do-in-the-future" class="section level2">
|
||||
<h2 class="hasAnchor">
|
||||
<a href="#to-do-in-the-future" class="anchor"></a>TO DO in the future</h2>
|
||||
<ul>
|
||||
<li>Negative bricks are “underside”</li>
|
||||
<li>bricks_from_models</li>
|
||||
<li>CRAN!</li>
|
||||
</ul>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header">
|
||||
<h1>GeomBrick</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/coord_brick.R'><code>R/coord_brick.R</code></a>, <a href='https://github.com/ryantimpe/brickr/blob/master/R/draw_key.R'><code>R/draw_key.R</code></a>, <a href='https://github.com/ryantimpe/brickr/blob/master/R/geom-brick-col.R'><code>R/geom-brick-col.R</code></a>, and 4 more</small>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/coord-brick.R'><code>R/coord-brick.R</code></a>, <a href='https://github.com/ryantimpe/brickr/blob/master/R/draw-key.R'><code>R/draw-key.R</code></a>, <a href='https://github.com/ryantimpe/brickr/blob/master/R/geom-brick-col.R'><code>R/geom-brick-col.R</code></a>, and 2 more</small>
|
||||
<div class="hidden name"><code>brickr-ggproto.Rd</code></div>
|
||||
</div>
|
||||
|
||||
@@ -134,30 +134,14 @@
|
||||
|
||||
</div>
|
||||
|
||||
<pre class="usage"><span class='fu'>draw_key_brick</span>(<span class='no'>data</span>, <span class='no'>params</span>, <span class='no'>size</span>)
|
||||
|
||||
<span class='no'>GeomStud</span>
|
||||
|
||||
<span class='fu'>resizingTextGrob</span>(<span class='no'>...</span>)
|
||||
|
||||
<span class='fu'>drawDetails.resizingTextGrob</span>(<span class='no'>x</span>, <span class='kw'>recording</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
|
||||
|
||||
<span class='fu'>preDrawDetails.resizingTextGrob</span>(<span class='no'>x</span>)
|
||||
|
||||
<span class='fu'>postDrawDetails.resizingTextGrob</span>(<span class='no'>x</span>)</pre>
|
||||
<pre class="usage"><span class='fu'>draw_key_brick</span>(<span class='no'>data</span>, <span class='no'>params</span>, <span class='no'>size</span>)</pre>
|
||||
|
||||
<h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2>
|
||||
|
||||
<p>An object of class <code>GeomStud</code> (inherits from <code>Geom</code>, <code>ggproto</code>, <code>gg</code>) of length 5.</p>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
<h2>Contents</h2>
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
|
||||
<li><a href="#format">Format</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Convert a data frame with x, y, & z coordinates & Color into bricks for 3D Model — bricks_from_coords • brickr</title>
|
||||
<title>Convert a data frame with x, y, z & Color columns into a brickr 3D object — bricks_from_coords • brickr</title>
|
||||
|
||||
<!-- favicons -->
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
||||
@@ -37,9 +37,9 @@
|
||||
|
||||
|
||||
|
||||
<meta property="og:title" content="Convert a data frame with x, y, & z coordinates & Color into bricks for 3D Model — bricks_from_coords" />
|
||||
<meta property="og:title" content="Convert a data frame with x, y, z & Color columns into a brickr 3D object — bricks_from_coords" />
|
||||
|
||||
<meta property="og:description" content="Convert a data frame with x, y, &amp; z coordinates &amp; Color into bricks for 3D Model" />
|
||||
<meta property="og:description" content="Convert a data frame with x, y, z &amp; Color columns into a brickr 3D object" />
|
||||
|
||||
<meta property="og:image" content="/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
@@ -72,7 +72,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -123,14 +123,14 @@
|
||||
<div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header">
|
||||
<h1>Convert a data frame with x, y, & z coordinates & Color into bricks for 3D Model</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/bricks_from.R'><code>R/bricks_from.R</code></a></small>
|
||||
<h1>Convert a data frame with x, y, z & Color columns into a brickr 3D object</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/bricks-from-tables.R'><code>R/bricks-from-tables.R</code></a></small>
|
||||
<div class="hidden name"><code>bricks_from_coords.Rd</code></div>
|
||||
</div>
|
||||
|
||||
<div class="ref-description">
|
||||
|
||||
<p>Convert a data frame with x, y, & z coordinates & Color into bricks for 3D Model</p>
|
||||
<p>Convert a data frame with x, y, z & Color columns into a brickr 3D object</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Convert an Excel brickr template into a 3D model. https://github.com/ryantimpe/brickr_toybox — bricks_from_excel • brickr</title>
|
||||
<title>Convert an Excel brickr template into a brickr 3D object — bricks_from_excel • brickr</title>
|
||||
|
||||
<!-- favicons -->
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
||||
@@ -37,9 +37,9 @@
|
||||
|
||||
|
||||
|
||||
<meta property="og:title" content="Convert an Excel brickr template into a 3D model. https://github.com/ryantimpe/brickr_toybox — bricks_from_excel" />
|
||||
<meta property="og:title" content="Convert an Excel brickr template into a brickr 3D object — bricks_from_excel" />
|
||||
|
||||
<meta property="og:description" content="Convert an Excel brickr template into a 3D model. https://github.com/ryantimpe/brickr_toybox" />
|
||||
<meta property="og:description" content="Convert an Excel brickr template into a brickr 3D object" />
|
||||
|
||||
<meta property="og:image" content="/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
@@ -72,7 +72,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -123,14 +123,14 @@
|
||||
<div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header">
|
||||
<h1>Convert an Excel brickr template into a 3D model. https://github.com/ryantimpe/brickr_toybox</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/bricks_from.R'><code>R/bricks_from.R</code></a></small>
|
||||
<h1>Convert an Excel brickr template into a brickr 3D object</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/bricks-from-tables.R'><code>R/bricks-from-tables.R</code></a></small>
|
||||
<div class="hidden name"><code>bricks_from_excel.Rd</code></div>
|
||||
</div>
|
||||
|
||||
<div class="ref-description">
|
||||
|
||||
<p>Convert an Excel brickr template into a 3D model. https://github.com/ryantimpe/brickr_toybox</p>
|
||||
<p>Convert an Excel brickr template into a brickr 3D object</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Convert image output from scale_image() to bricks — bricks_from_mosaic • brickr</title>
|
||||
<title>Convert a 2D LEGO mosaic into a brickr 3D object — bricks_from_mosaic • brickr</title>
|
||||
|
||||
<!-- favicons -->
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
||||
@@ -37,9 +37,9 @@
|
||||
|
||||
|
||||
|
||||
<meta property="og:title" content="Convert image output from scale_image() to bricks — bricks_from_mosaic" />
|
||||
<meta property="og:title" content="Convert a 2D LEGO mosaic into a brickr 3D object — bricks_from_mosaic" />
|
||||
|
||||
<meta property="og:description" content="Convert image output from scale_image() to bricks" />
|
||||
<meta property="og:description" content="Convert a 2D LEGO mosaic into a brickr 3D object" />
|
||||
|
||||
<meta property="og:image" content="/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
@@ -72,7 +72,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -123,24 +123,25 @@
|
||||
<div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header">
|
||||
<h1>Convert image output from scale_image() to bricks</h1>
|
||||
<h1>Convert a 2D LEGO mosaic into a brickr 3D object</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/bricks-from-mosaic.R'><code>R/bricks-from-mosaic.R</code></a></small>
|
||||
<div class="hidden name"><code>bricks_from_mosaic.Rd</code></div>
|
||||
</div>
|
||||
|
||||
<div class="ref-description">
|
||||
|
||||
<p>Convert image output from scale_image() to bricks</p>
|
||||
<p>Convert a 2D LEGO mosaic into a brickr 3D object</p>
|
||||
|
||||
</div>
|
||||
|
||||
<pre class="usage"><span class='fu'>bricks_from_mosaic</span>(<span class='no'>image_list</span>, <span class='kw'>mosaic_height</span> <span class='kw'>=</span> <span class='fl'>6</span>, <span class='kw'>highest_el</span> <span class='kw'>=</span> <span class='st'>"light"</span>)</pre>
|
||||
<pre class="usage"><span class='fu'>bricks_from_mosaic</span>(<span class='no'>mosaic_list</span>, <span class='kw'>mosaic_height</span> <span class='kw'>=</span> <span class='fl'>6</span>,
|
||||
<span class='kw'>highest_el</span> <span class='kw'>=</span> <span class='st'>"light"</span>)</pre>
|
||||
|
||||
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
|
||||
<table class="ref-arguments">
|
||||
<colgroup><col class="name" /><col class="desc" /></colgroup>
|
||||
<tr>
|
||||
<th>image_list</th>
|
||||
<th>mosaic_list</th>
|
||||
<td><p>List output from collect_bricks() or image_to_bricks(). Contains an element <code>Img_lego</code>.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Convert image output from scale_image() to bricks — bricks_from_rayshader • brickr</title>
|
||||
<title>Build a brickr 3D object from rayshader hillshade & heightmap matrices — bricks_from_rayshader • brickr</title>
|
||||
|
||||
<!-- favicons -->
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
||||
@@ -37,9 +37,9 @@
|
||||
|
||||
|
||||
|
||||
<meta property="og:title" content="Convert image output from scale_image() to bricks — bricks_from_rayshader" />
|
||||
<meta property="og:title" content="Build a brickr 3D object from rayshader hillshade & heightmap matrices — bricks_from_rayshader" />
|
||||
|
||||
<meta property="og:description" content="Convert image output from scale_image() to bricks" />
|
||||
<meta property="og:description" content="Build a brickr 3D object from rayshader hillshade &amp; heightmap matrices" />
|
||||
|
||||
<meta property="og:image" content="/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
@@ -72,7 +72,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -123,14 +123,14 @@
|
||||
<div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header">
|
||||
<h1>Convert image output from scale_image() to bricks</h1>
|
||||
<h1>Build a brickr 3D object from rayshader hillshade & heightmap matrices</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/bricks-from-rayshader.R'><code>R/bricks-from-rayshader.R</code></a></small>
|
||||
<div class="hidden name"><code>bricks_from_rayshader.Rd</code></div>
|
||||
</div>
|
||||
|
||||
<div class="ref-description">
|
||||
|
||||
<p>Convert image output from scale_image() to bricks</p>
|
||||
<p>Build a brickr 3D object from rayshader hillshade & heightmap matrices</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Convert a data frame in 3D matrix format into bricks for 3D Model — bricks_from_table • brickr</title>
|
||||
<title>Convert a matrix table into a brickr 3D object — bricks_from_table • brickr</title>
|
||||
|
||||
<!-- favicons -->
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
||||
@@ -37,9 +37,9 @@
|
||||
|
||||
|
||||
|
||||
<meta property="og:title" content="Convert a data frame in 3D matrix format into bricks for 3D Model — bricks_from_table" />
|
||||
<meta property="og:title" content="Convert a matrix table into a brickr 3D object — bricks_from_table" />
|
||||
|
||||
<meta property="og:description" content="Convert a data frame in 3D matrix format into bricks for 3D Model" />
|
||||
<meta property="og:description" content="Convert a matrix table into a brickr 3D object" />
|
||||
|
||||
<meta property="og:image" content="/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
@@ -72,7 +72,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -123,14 +123,14 @@
|
||||
<div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header">
|
||||
<h1>Convert a data frame in 3D matrix format into bricks for 3D Model</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/bricks_from.R'><code>R/bricks_from.R</code></a></small>
|
||||
<h1>Convert a matrix table into a brickr 3D object</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/bricks-from-tables.R'><code>R/bricks-from-tables.R</code></a></small>
|
||||
<div class="hidden name"><code>bricks_from_table.Rd</code></div>
|
||||
</div>
|
||||
|
||||
<div class="ref-description">
|
||||
|
||||
<p>Convert a data frame in 3D matrix format into bricks for 3D Model</p>
|
||||
<p>Convert a matrix table into a brickr 3D object</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Available brick colors — build_colors • brickr</title>
|
||||
<title>Dispaly available brick colors — build_colors • brickr</title>
|
||||
|
||||
<!-- favicons -->
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
|
||||
|
||||
<meta property="og:title" content="Available brick colors — build_colors" />
|
||||
<meta property="og:title" content="Dispaly available brick colors — build_colors" />
|
||||
|
||||
<meta property="og:description" content="Generates a plot of available brick colors. Use .names_only = TRUE to get a list of color names." />
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header">
|
||||
<h1>Available brick colors</h1>
|
||||
<h1>Dispaly available brick colors</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/colors-and-themes.R'><code>R/colors-and-themes.R</code></a></small>
|
||||
<div class="hidden name"><code>build_colors.Rd</code></div>
|
||||
</div>
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header">
|
||||
<h1>Create instruction manual for 2D image mosaics</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/view_image.R'><code>R/view_image.R</code></a></small>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/build-mosaic.R'><code>R/build-mosaic.R</code></a></small>
|
||||
<div class="hidden name"><code>build_instructions.Rd</code></div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Display 2D mosaic output as a plot image — build_mosaic • brickr</title>
|
||||
<title>Display 2D LEGO mosaic as a plot image — build_mosaic • brickr</title>
|
||||
|
||||
<!-- favicons -->
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
||||
@@ -37,9 +37,9 @@
|
||||
|
||||
|
||||
|
||||
<meta property="og:title" content="Display 2D mosaic output as a plot image — build_mosaic" />
|
||||
<meta property="og:title" content="Display 2D LEGO mosaic as a plot image — build_mosaic" />
|
||||
|
||||
<meta property="og:description" content="Display 2D mosaic output as a plot image" />
|
||||
<meta property="og:description" content="Display 2D LEGO mosaic as a plot image" />
|
||||
|
||||
<meta property="og:image" content="/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
@@ -72,7 +72,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -123,14 +123,14 @@
|
||||
<div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header">
|
||||
<h1>Display 2D mosaic output as a plot image</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/view_image.R'><code>R/view_image.R</code></a></small>
|
||||
<h1>Display 2D LEGO mosaic as a plot image</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/build-mosaic.R'><code>R/build-mosaic.R</code></a></small>
|
||||
<div class="hidden name"><code>build_mosaic.Rd</code></div>
|
||||
</div>
|
||||
|
||||
<div class="ref-description">
|
||||
|
||||
<p>Display 2D mosaic output as a plot image</p>
|
||||
<p>Display 2D LEGO mosaic as a plot image</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header">
|
||||
<h1>Graphically display required bricks.</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/piece_count.R'><code>R/piece_count.R</code></a></small>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/piece-count.R'><code>R/piece-count.R</code></a></small>
|
||||
<div class="hidden name"><code>build_pieces.Rd</code></div>
|
||||
</div>
|
||||
|
||||
|
||||
180
docs/reference/build_pieces_table.html
Normal file
180
docs/reference/build_pieces_table.html
Normal file
@@ -0,0 +1,180 @@
|
||||
<!-- Generated by pkgdown: do not edit by hand -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Generate required bricks as a data frame. — build_pieces_table • brickr</title>
|
||||
|
||||
<!-- favicons -->
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png" />
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
|
||||
<!-- jquery -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
|
||||
<!-- Bootstrap -->
|
||||
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- Font Awesome icons -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
|
||||
|
||||
<!-- clipboard.js -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- sticky kit -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- pkgdown -->
|
||||
<link href="../pkgdown.css" rel="stylesheet">
|
||||
<script src="../pkgdown.js"></script>
|
||||
|
||||
|
||||
|
||||
<meta property="og:title" content="Generate required bricks as a data frame. — build_pieces_table" />
|
||||
|
||||
<meta property="og:description" content="Generate required bricks as a data frame." />
|
||||
|
||||
<meta property="og:image" content="/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
|
||||
<!-- mathjax -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container template-reference-topic">
|
||||
<header>
|
||||
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li>
|
||||
<a href="../index.html">
|
||||
<span class="fa fa-home fa-lg"></span>
|
||||
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/index.html">Reference</a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
Articles
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/mosaics.html">Mosaics with brickr</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../news/index.html">Changelog</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://github.com/ryantimpe/brickr">
|
||||
<span class="fa fa-github fa-lg"></span>
|
||||
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div><!--/.nav-collapse -->
|
||||
</div><!--/.container -->
|
||||
</div><!--/.navbar -->
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header">
|
||||
<h1>Generate required bricks as a data frame.</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/piece-count.R'><code>R/piece-count.R</code></a></small>
|
||||
<div class="hidden name"><code>build_pieces_table.Rd</code></div>
|
||||
</div>
|
||||
|
||||
<div class="ref-description">
|
||||
|
||||
<p>Generate required bricks as a data frame.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<pre class="usage"><span class='fu'>build_pieces_table</span>(<span class='no'>image_list</span>)</pre>
|
||||
|
||||
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
|
||||
<table class="ref-arguments">
|
||||
<colgroup><col class="name" /><col class="desc" /></colgroup>
|
||||
<tr>
|
||||
<th>image_list</th>
|
||||
<td><p>List output from collect_bricks() or image_to_bricks(). Contains an element <code>Img_lego</code>.</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
|
||||
|
||||
<p>Data frame of piece counts by LEGO color name and size.</p>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
<h2>Contents</h2>
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li><a href="#arguments">Arguments</a></li>
|
||||
|
||||
<li><a href="#value">Value</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<div class="copyright">
|
||||
<p>Developed by Ryan Timpe.</p>
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Available brick themes for scale_fill_brick() — build_themes • brickr</title>
|
||||
<title>Display available brick themes for ggplot feature scale_fill_brick() — build_themes • brickr</title>
|
||||
|
||||
<!-- favicons -->
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
|
||||
|
||||
<meta property="og:title" content="Available brick themes for scale_fill_brick() — build_themes" />
|
||||
<meta property="og:title" content="Display available brick themes for ggplot feature scale_fill_brick() — build_themes" />
|
||||
|
||||
<meta property="og:description" content="Generates a plot of available brick themes." />
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header">
|
||||
<h1>Available brick themes for scale_fill_brick()</h1>
|
||||
<h1>Display available brick themes for ggplot feature scale_fill_brick()</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/colors-and-themes.R'><code>R/colors-and-themes.R</code></a></small>
|
||||
<div class="hidden name"><code>build_themes.Rd</code></div>
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Collect legoize image from individual bricks into grouped bricks. — collect_bricks • brickr</title>
|
||||
<title>Consolidate 1x1 bricks into larger ones of the same color. Internal function. — collect_bricks • brickr</title>
|
||||
|
||||
<!-- favicons -->
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
||||
@@ -37,9 +37,9 @@
|
||||
|
||||
|
||||
|
||||
<meta property="og:title" content="Collect legoize image from individual bricks into grouped bricks. — collect_bricks" />
|
||||
<meta property="og:title" content="Consolidate 1x1 bricks into larger ones of the same color. Internal function. — collect_bricks" />
|
||||
|
||||
<meta property="og:description" content="Collect legoize image from individual bricks into grouped bricks." />
|
||||
<meta property="og:description" content="Consolidate 1x1 bricks into larger ones of the same color. Internal function." />
|
||||
|
||||
<meta property="og:image" content="/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
@@ -72,7 +72,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -123,14 +123,14 @@
|
||||
<div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header">
|
||||
<h1>Collect legoize image from individual bricks into grouped bricks.</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/collect_bricks.R'><code>R/collect_bricks.R</code></a></small>
|
||||
<h1>Consolidate 1x1 bricks into larger ones of the same color. Internal function.</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/collect-bricks.R'><code>R/collect-bricks.R</code></a></small>
|
||||
<div class="hidden name"><code>collect_bricks.Rd</code></div>
|
||||
</div>
|
||||
|
||||
<div class="ref-description">
|
||||
|
||||
<p>Collect legoize image from individual bricks into grouped bricks.</p>
|
||||
<p>Consolidate 1x1 bricks into larger ones of the same color. Internal function.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
BIN
docs/reference/coord-brick-1.png
Normal file
BIN
docs/reference/coord-brick-1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 37 KiB |
BIN
docs/reference/coord-brick-2.png
Normal file
BIN
docs/reference/coord-brick-2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
213
docs/reference/coord-brick.html
Normal file
213
docs/reference/coord-brick.html
Normal file
@@ -0,0 +1,213 @@
|
||||
<!-- Generated by pkgdown: do not edit by hand -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Cartesian coordinates for bricks - ggplot2 extension — coord_brick • brickr</title>
|
||||
|
||||
<!-- favicons -->
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png" />
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
|
||||
<!-- jquery -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
|
||||
<!-- Bootstrap -->
|
||||
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- Font Awesome icons -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
|
||||
|
||||
<!-- clipboard.js -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- sticky kit -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- pkgdown -->
|
||||
<link href="../pkgdown.css" rel="stylesheet">
|
||||
<script src="../pkgdown.js"></script>
|
||||
|
||||
|
||||
|
||||
<meta property="og:title" content="Cartesian coordinates for bricks - ggplot2 extension — coord_brick" />
|
||||
|
||||
<meta property="og:description" content="A fixed scale coordinate system that ensures correct brick proportions are maintained regardless of device size.
|
||||
Use coord_brick_flip() for horizontal bars." />
|
||||
|
||||
<meta property="og:image" content="/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
|
||||
<!-- mathjax -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container template-reference-topic">
|
||||
<header>
|
||||
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li>
|
||||
<a href="../index.html">
|
||||
<span class="fa fa-home fa-lg"></span>
|
||||
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/index.html">Reference</a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
Articles
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/mosaics.html">Mosaics with brickr</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../news/index.html">Changelog</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://github.com/ryantimpe/brickr">
|
||||
<span class="fa fa-github fa-lg"></span>
|
||||
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div><!--/.nav-collapse -->
|
||||
</div><!--/.container -->
|
||||
</div><!--/.navbar -->
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header">
|
||||
<h1>Cartesian coordinates for bricks - ggplot2 extension</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/coord-brick.R'><code>R/coord-brick.R</code></a></small>
|
||||
<div class="hidden name"><code>coord-brick.Rd</code></div>
|
||||
</div>
|
||||
|
||||
<div class="ref-description">
|
||||
|
||||
<p>A fixed scale coordinate system that ensures correct brick proportions are maintained regardless of device size.
|
||||
Use <code>coord_brick_flip()</code> for horizontal bars.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<pre class="usage"><span class='fu'>coord_brick</span>(<span class='kw'>xlim</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>ylim</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>expand</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>clip</span> <span class='kw'>=</span> <span class='st'>"on"</span>)
|
||||
|
||||
<span class='fu'>coord_brick_flip</span>(<span class='kw'>xlim</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>ylim</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>expand</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
|
||||
<span class='kw'>clip</span> <span class='kw'>=</span> <span class='st'>"on"</span>)</pre>
|
||||
|
||||
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
|
||||
<table class="ref-arguments">
|
||||
<colgroup><col class="name" /><col class="desc" /></colgroup>
|
||||
<tr>
|
||||
<th>xlim</th>
|
||||
<td><p>Limits for the x and y axes.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>ylim</th>
|
||||
<td><p>Limits for the x and y axes.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>expand</th>
|
||||
<td><p>If <code>TRUE</code>, the default, adds a small expansion factor to
|
||||
the limits to ensure that data and axes don't overlap. If <code>FALSE</code>,
|
||||
limits are taken exactly from the data or <code>xlim</code>/<code>ylim</code>.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>clip</th>
|
||||
<td><p>Should drawing be clipped to the extent of the plot panel? A
|
||||
setting of <code>"on"</code> (the default) means yes, and a setting of <code>"off"</code>
|
||||
means no. In most cases, the default of <code>"on"</code> should not be changed,
|
||||
as setting <code>clip = "off"</code> can cause unexpected results. It allows
|
||||
drawing of data points anywhere on the plot, including in the plot margins. If
|
||||
limits are set via <code>xlim</code> and <code>ylim</code> and some data points fall outside those
|
||||
limits, then those data points may show up in places such as the axes, the
|
||||
legend, the plot title, or the plot margins.</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><div class='input'><span class='co'>#geom_brick_col should be used in conjunction with other brickr charting functions, especially coord_brick.</span>
|
||||
<span class='no'>df</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/data.frame'>data.frame</a></span>(<span class='kw'>trt</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"a"</span>, <span class='st'>"b"</span>, <span class='st'>"c"</span>), <span class='kw'>outcome</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>2.3</span>, <span class='fl'>1.9</span>, <span class='fl'>3.2</span>))
|
||||
<span class='fu'>ggplot</span>(<span class='no'>df</span>, <span class='fu'>aes</span>(<span class='no'>trt</span>, <span class='no'>outcome</span>)) +
|
||||
<span class='fu'><a href='geom_brick_col.html'>geom_brick_col</a></span>(<span class='fu'>aes</span>(<span class='kw'>fill</span> <span class='kw'>=</span> <span class='no'>trt</span>)) +
|
||||
<span class='fu'>coord_brick</span>()</div><div class='img'><img src='coord-brick-1.png' alt='' width='700' height='433' /></div><div class='input'>
|
||||
<span class='co'>#horizontal bars</span>
|
||||
<span class='fu'>ggplot</span>(<span class='no'>df</span>, <span class='fu'>aes</span>(<span class='no'>trt</span>, <span class='no'>outcome</span>)) +
|
||||
<span class='fu'><a href='geom_brick_col.html'>geom_brick_col</a></span>(<span class='fu'>aes</span>(<span class='kw'>fill</span> <span class='kw'>=</span> <span class='no'>trt</span>)) +
|
||||
<span class='fu'>coord_brick_flip</span>()</div><div class='img'><img src='coord-brick-2.png' alt='' width='700' height='433' /></div><div class='input'>
|
||||
</div></pre>
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
<h2>Contents</h2>
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li><a href="#arguments">Arguments</a></li>
|
||||
|
||||
<li><a href="#examples">Examples</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<div class="copyright">
|
||||
<p>Developed by Ryan Timpe.</p>
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -73,7 +73,7 @@ Use coord_brick_flip() for horizontal bars." />
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9010</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ Bar height is determined by values in the data using the y aesthetic. With the e
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -229,12 +229,12 @@ the default plot specification, e.g. <code>borders()</code>.</p></td>
|
||||
<span class='no'>df</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/data.frame'>data.frame</a></span>(<span class='kw'>trt</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"a"</span>, <span class='st'>"b"</span>, <span class='st'>"c"</span>), <span class='kw'>outcome</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>2.3</span>, <span class='fl'>1.9</span>, <span class='fl'>3.2</span>))
|
||||
<span class='fu'>ggplot</span>(<span class='no'>df</span>, <span class='fu'>aes</span>(<span class='no'>trt</span>, <span class='no'>outcome</span>)) +
|
||||
<span class='fu'>geom_brick_col</span>() +
|
||||
<span class='fu'><a href='coord_brick.html'>coord_brick</a></span>()</div><div class='img'><img src='geom_brick_col-1.png' alt='' width='700' height='433' /></div><div class='input'>
|
||||
<span class='fu'><a href='coord-brick.html'>coord_brick</a></span>()</div><div class='img'><img src='geom_brick_col-1.png' alt='' width='700' height='433' /></div><div class='input'>
|
||||
<span class='co'>#For official LEGO colors, use with scale_fill_brick and theme_brick.</span>
|
||||
<span class='fu'>ggplot</span>(<span class='no'>df</span>, <span class='fu'>aes</span>(<span class='no'>trt</span>, <span class='no'>outcome</span>)) +
|
||||
<span class='fu'>geom_brick_col</span>(<span class='fu'>aes</span>(<span class='kw'>fill</span> <span class='kw'>=</span> <span class='no'>trt</span>)) +
|
||||
<span class='fu'><a href='scale_fill_brick.html'>scale_fill_brick</a></span>() +
|
||||
<span class='fu'><a href='coord_brick.html'>coord_brick</a></span>() +
|
||||
<span class='fu'><a href='coord-brick.html'>coord_brick</a></span>() +
|
||||
<span class='fu'><a href='theme_brick.html'>theme_brick</a></span>()</div><div class='img'><img src='geom_brick_col-2.png' alt='' width='700' height='433' /></div><div class='input'>
|
||||
</div></pre>
|
||||
</div>
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9010</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -139,12 +139,91 @@
|
||||
<span class='kw'>simplified_threshold</span> <span class='kw'>=</span> <span class='fl'>24</span> * <span class='fl'>24</span>, <span class='kw'>label_scale</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>use_bricks</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
|
||||
<span class='kw'>linejoin</span> <span class='kw'>=</span> <span class='st'>"mitre"</span>, <span class='kw'>na.rm</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>show.legend</span> <span class='kw'>=</span> <span class='fl'>NA</span>,
|
||||
<span class='kw'>inherit.aes</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</pre>
|
||||
|
||||
|
||||
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
|
||||
<table class="ref-arguments">
|
||||
<colgroup><col class="name" /><col class="desc" /></colgroup>
|
||||
<tr>
|
||||
<th>mapping</th>
|
||||
<td><p>Set of aesthetic mappings created by <code>aes()</code> or
|
||||
<code>aes_()</code>. If specified and <code>inherit.aes = TRUE</code> (the
|
||||
default), it is combined with the default mapping at the top level of the
|
||||
plot. You must supply <code>mapping</code> if there is no plot mapping.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>data</th>
|
||||
<td><p>The data to be displayed in this layer. There are three
|
||||
options:</p>
|
||||
<p>If <code>NULL</code>, the default, the data is inherited from the plot
|
||||
data as specified in the call to <code>ggplot()</code>.</p>
|
||||
<p>A <code>data.frame</code>, or other object, will override the plot
|
||||
data. All objects will be fortified to produce a data frame. See
|
||||
<code>fortify()</code> for which variables will be created.</p>
|
||||
<p>A <code>function</code> will be called with a single argument,
|
||||
the plot data. The return value must be a <code>data.frame</code>, and
|
||||
will be used as the layer data.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>stat</th>
|
||||
<td><p>The statistical transformation to use on the data for this
|
||||
layer, as a string.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>position</th>
|
||||
<td><p>Position adjustment, either as a string, or the result of
|
||||
a call to a position adjustment function.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>...</th>
|
||||
<td><p>Other arguments passed on to <code>layer()</code>. These are
|
||||
often aesthetics, used to set an aesthetic to a fixed value, like
|
||||
<code>colour = "red"</code> or <code>size = 3</code>. They may also be parameters
|
||||
to the paired geom/stat.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>label</th>
|
||||
<td><p>Character string to include as embossed text inside brick knobs. Maximum 6 characters.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>simplified_threshold</th>
|
||||
<td><p>Maximum number of knobs on the plot before embossed label is suppressed.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>label_scale</th>
|
||||
<td><p>Scale text size of label as a percentage.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>use_bricks</th>
|
||||
<td><p>Array of brick sizes to use in mosaic. Defaults to <code><a href='https://www.rdocumentation.org/packages/base/topics/c'>c('4x2', '2x2', '3x1', '2x1', '1x1')</a></code>`.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>na.rm</th>
|
||||
<td><p>If <code>FALSE</code>, the default, missing values are removed with
|
||||
a warning. If <code>TRUE</code>, missing values are silently removed.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>show.legend</th>
|
||||
<td><p>logical. Should this layer be included in the legends?
|
||||
<code>NA</code>, the default, includes if any aesthetics are mapped.
|
||||
<code>FALSE</code> never includes, and <code>TRUE</code> always includes.
|
||||
It can also be a named logical vector to finely select the aesthetics to
|
||||
display.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>inherit.aes</th>
|
||||
<td><p>If <code>FALSE</code>, overrides the default aesthetics,
|
||||
rather than combining with them. This is most useful for helper functions
|
||||
that define both data and aesthetics and shouldn't inherit behaviour from
|
||||
the default plot specification, e.g. <code>borders()</code>.</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
<h2>Contents</h2>
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li><a href="#arguments">Arguments</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Convert image raster array to a LEGO-esque mosaic. Wrapper function. — image_to_mosaic • brickr</title>
|
||||
<title>Create a 2D LEGO mosaic from an image array — image_to_mosaic • brickr</title>
|
||||
|
||||
<!-- favicons -->
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
||||
@@ -37,9 +37,9 @@
|
||||
|
||||
|
||||
|
||||
<meta property="og:title" content="Convert image raster array to a LEGO-esque mosaic. Wrapper function. — image_to_mosaic" />
|
||||
<meta property="og:title" content="Create a 2D LEGO mosaic from an image array — image_to_mosaic" />
|
||||
|
||||
<meta property="og:description" content="Convert image raster array to a LEGO-esque mosaic. Wrapper function." />
|
||||
<meta property="og:description" content="Create a 2D LEGO mosaic from an image array" />
|
||||
|
||||
<meta property="og:image" content="/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
@@ -72,7 +72,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -123,14 +123,14 @@
|
||||
<div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header">
|
||||
<h1>Convert image raster array to a LEGO-esque mosaic. Wrapper function.</h1>
|
||||
<h1>Create a 2D LEGO mosaic from an image array</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/image-to-mosaic.R'><code>R/image-to-mosaic.R</code></a></small>
|
||||
<div class="hidden name"><code>image_to_mosaic.Rd</code></div>
|
||||
</div>
|
||||
|
||||
<div class="ref-description">
|
||||
|
||||
<p>Convert image raster array to a LEGO-esque mosaic. Wrapper function.</p>
|
||||
<p>Create a 2D LEGO mosaic from an image array</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Scale an image raster array to a small number of pixels. Process into a data frame. — image_to_scaled • brickr</title>
|
||||
<title>Scale an image raster array to a small number of pixels. Process into a data frame. Internal function. — image_to_scaled • brickr</title>
|
||||
|
||||
<!-- favicons -->
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
||||
@@ -37,9 +37,9 @@
|
||||
|
||||
|
||||
|
||||
<meta property="og:title" content="Scale an image raster array to a small number of pixels. Process into a data frame. — image_to_scaled" />
|
||||
<meta property="og:title" content="Scale an image raster array to a small number of pixels. Process into a data frame. Internal function. — image_to_scaled" />
|
||||
|
||||
<meta property="og:description" content="Scale an image raster array to a small number of pixels. Process into a data frame." />
|
||||
<meta property="og:description" content="Scale an image raster array to a small number of pixels. Process into a data frame. Internal function." />
|
||||
|
||||
<meta property="og:image" content="/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
@@ -72,7 +72,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -123,14 +123,14 @@
|
||||
<div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header">
|
||||
<h1>Scale an image raster array to a small number of pixels. Process into a data frame.</h1>
|
||||
<h1>Scale an image raster array to a small number of pixels. Process into a data frame. Internal function.</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/image-to-prep-mosaic.R'><code>R/image-to-prep-mosaic.R</code></a></small>
|
||||
<div class="hidden name"><code>image_to_scaled.Rd</code></div>
|
||||
</div>
|
||||
|
||||
<div class="ref-description">
|
||||
|
||||
<p>Scale an image raster array to a small number of pixels. Process into a data frame.</p>
|
||||
<p>Scale an image raster array to a small number of pixels. Process into a data frame. Internal function.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
<p><code><a href="brickr-ggproto.html">draw_key_brick()</a></code> <code><a href="brickr-ggproto.html">GeomStud</a></code> <code><a href="brickr-ggproto.html">resizingTextGrob()</a></code> <code><a href="brickr-ggproto.html">drawDetails.resizingTextGrob()</a></code> <code><a href="brickr-ggproto.html">preDrawDetails.resizingTextGrob()</a></code> <code><a href="brickr-ggproto.html">postDrawDetails.resizingTextGrob()</a></code> </p>
|
||||
<p><code><a href="brickr-ggproto.html">draw_key_brick()</a></code> </p>
|
||||
</td>
|
||||
<td><p>GeomBrick</p></td>
|
||||
</tr><tr>
|
||||
@@ -150,31 +150,31 @@
|
||||
<td>
|
||||
<p><code><a href="bricks_from_coords.html">bricks_from_coords()</a></code> </p>
|
||||
</td>
|
||||
<td><p>Convert a data frame with x, y, & z coordinates & Color into bricks for 3D Model</p></td>
|
||||
<td><p>Convert a data frame with x, y, z & Color columns into a brickr 3D object</p></td>
|
||||
</tr><tr>
|
||||
|
||||
<td>
|
||||
<p><code><a href="bricks_from_excel.html">bricks_from_excel()</a></code> </p>
|
||||
</td>
|
||||
<td><p>Convert an Excel brickr template into a 3D model. https://github.com/ryantimpe/brickr_toybox</p></td>
|
||||
<td><p>Convert an Excel brickr template into a brickr 3D object</p></td>
|
||||
</tr><tr>
|
||||
|
||||
<td>
|
||||
<p><code><a href="bricks_from_mosaic.html">bricks_from_mosaic()</a></code> </p>
|
||||
</td>
|
||||
<td><p>Convert image output from scale_image() to bricks</p></td>
|
||||
<td><p>Convert a 2D LEGO mosaic into a brickr 3D object</p></td>
|
||||
</tr><tr>
|
||||
|
||||
<td>
|
||||
<p><code><a href="bricks_from_rayshader.html">bricks_from_rayshader()</a></code> </p>
|
||||
</td>
|
||||
<td><p>Convert image output from scale_image() to bricks</p></td>
|
||||
<td><p>Build a brickr 3D object from rayshader hillshade & heightmap matrices</p></td>
|
||||
</tr><tr>
|
||||
|
||||
<td>
|
||||
<p><code><a href="bricks_from_table.html">bricks_from_table()</a></code> </p>
|
||||
</td>
|
||||
<td><p>Convert a data frame in 3D matrix format into bricks for 3D Model</p></td>
|
||||
<td><p>Convert a matrix table into a brickr 3D object</p></td>
|
||||
</tr><tr>
|
||||
|
||||
<td>
|
||||
@@ -186,7 +186,7 @@
|
||||
<td>
|
||||
<p><code><a href="build_colors.html">build_colors()</a></code> </p>
|
||||
</td>
|
||||
<td><p>Available brick colors</p></td>
|
||||
<td><p>Dispaly available brick colors</p></td>
|
||||
</tr><tr>
|
||||
|
||||
<td>
|
||||
@@ -198,7 +198,7 @@
|
||||
<td>
|
||||
<p><code><a href="build_mosaic.html">build_mosaic()</a></code> </p>
|
||||
</td>
|
||||
<td><p>Display 2D mosaic output as a plot image</p></td>
|
||||
<td><p>Display 2D LEGO mosaic as a plot image</p></td>
|
||||
</tr><tr>
|
||||
|
||||
<td>
|
||||
@@ -207,22 +207,28 @@
|
||||
<td><p>Graphically display required bricks.</p></td>
|
||||
</tr><tr>
|
||||
|
||||
<td>
|
||||
<p><code><a href="build_pieces_table.html">build_pieces_table()</a></code> </p>
|
||||
</td>
|
||||
<td><p>Generate required bricks as a data frame.</p></td>
|
||||
</tr><tr>
|
||||
|
||||
<td>
|
||||
<p><code><a href="build_themes.html">build_themes()</a></code> </p>
|
||||
</td>
|
||||
<td><p>Available brick themes for scale_fill_brick()</p></td>
|
||||
<td><p>Display available brick themes for ggplot feature scale_fill_brick()</p></td>
|
||||
</tr><tr>
|
||||
|
||||
<td>
|
||||
<p><code><a href="collect_bricks.html">collect_bricks()</a></code> </p>
|
||||
</td>
|
||||
<td><p>Collect legoize image from individual bricks into grouped bricks.</p></td>
|
||||
<td><p>Consolidate 1x1 bricks into larger ones of the same color. Internal function.</p></td>
|
||||
</tr><tr>
|
||||
|
||||
<td>
|
||||
<p><code><a href="coord_brick.html">coord_brick()</a></code> <code><a href="coord_brick.html">coord_brick_flip()</a></code> </p>
|
||||
<p><code><a href="coord-brick.html">coord_brick()</a></code> <code><a href="coord-brick.html">coord_brick_flip()</a></code> </p>
|
||||
</td>
|
||||
<td><p>Cartesian coordinates for bricks</p></td>
|
||||
<td><p>Cartesian coordinates for bricks - ggplot2 extension</p></td>
|
||||
</tr><tr>
|
||||
|
||||
<td>
|
||||
@@ -231,12 +237,6 @@
|
||||
<td><p>Bar charts with bricks</p></td>
|
||||
</tr><tr>
|
||||
|
||||
<td>
|
||||
<p><code><a href="geom_brick_point.html">geom_brick_point()</a></code> </p>
|
||||
</td>
|
||||
<td><p>ggplot2 Points, as Bricks</p></td>
|
||||
</tr><tr>
|
||||
|
||||
<td>
|
||||
<p><code><a href="geom_brick_rect.html">geom_brick_rect()</a></code> </p>
|
||||
</td>
|
||||
@@ -246,19 +246,19 @@
|
||||
<td>
|
||||
<p><code><a href="image_to_mosaic.html">image_to_mosaic()</a></code> </p>
|
||||
</td>
|
||||
<td><p>Convert image raster array to a LEGO-esque mosaic. Wrapper function.</p></td>
|
||||
<td><p>Create a 2D LEGO mosaic from an image array</p></td>
|
||||
</tr><tr>
|
||||
|
||||
<td>
|
||||
<p><code><a href="image_to_scaled.html">image_to_scaled</a></code> </p>
|
||||
</td>
|
||||
<td><p>Scale an image raster array to a small number of pixels. Process into a data frame.</p></td>
|
||||
<td><p>Scale an image raster array to a small number of pixels. Process into a data frame. Internal function.</p></td>
|
||||
</tr><tr>
|
||||
|
||||
<td>
|
||||
<p><code><a href="layer_from_bricks.html">layer_from_bricks()</a></code> </p>
|
||||
</td>
|
||||
<td><p>Helper function to convert a level from a 3D model into a rayshader-friendly object.</p></td>
|
||||
<td><p>Display a brickr object as a 3D model</p></td>
|
||||
</tr><tr>
|
||||
|
||||
<td>
|
||||
@@ -270,19 +270,13 @@
|
||||
<td>
|
||||
<p><code><a href="scale_fill_brick.html">scale_fill_brick()</a></code> </p>
|
||||
</td>
|
||||
<td><p>Color scales for bricks</p></td>
|
||||
</tr><tr>
|
||||
|
||||
<td>
|
||||
<p><code><a href="table_pieces.html">table_pieces()</a></code> </p>
|
||||
</td>
|
||||
<td><p>Generate required bricks as a data frame.</p></td>
|
||||
<td><p>Color scales for bricks - ggplot2 extension</p></td>
|
||||
</tr><tr>
|
||||
|
||||
<td>
|
||||
<p><code><a href="theme_brick.html">theme_brick()</a></code> </p>
|
||||
</td>
|
||||
<td><p>Brick color themes</p></td>
|
||||
<td><p>Brick color themes - ggplot2 extension</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Helper function to convert a level from a 3D model into a rayshader-friendly object. — layer_from_bricks • brickr</title>
|
||||
<title>Display a brickr object as a 3D model — layer_from_bricks • brickr</title>
|
||||
|
||||
<!-- favicons -->
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
||||
@@ -37,9 +37,9 @@
|
||||
|
||||
|
||||
|
||||
<meta property="og:title" content="Helper function to convert a level from a 3D model into a rayshader-friendly object. — layer_from_bricks" />
|
||||
<meta property="og:title" content="Display a brickr object as a 3D model — layer_from_bricks" />
|
||||
|
||||
<meta property="og:description" content="Helper function to convert a level from a 3D model into a rayshader-friendly object." />
|
||||
<meta property="og:description" content="Display a brickr object as a 3D model" />
|
||||
|
||||
<meta property="og:image" content="/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
@@ -72,7 +72,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -123,14 +123,14 @@
|
||||
<div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header">
|
||||
<h1>Helper function to convert a level from a 3D model into a rayshader-friendly object.</h1>
|
||||
<h1>Display a brickr object as a 3D model</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/build-bricks.R'><code>R/build-bricks.R</code></a></small>
|
||||
<div class="hidden name"><code>layer_from_bricks.Rd</code></div>
|
||||
</div>
|
||||
|
||||
<div class="ref-description">
|
||||
|
||||
<p>Helper function to convert a level from a 3D model into a rayshader-friendly object.</p>
|
||||
<p>Display a brickr object as a 3D model</p>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
<colgroup><col class="name" /><col class="desc" /></colgroup>
|
||||
<tr>
|
||||
<th>brick_list</th>
|
||||
<td><p>List output from table_to_bricks(). Contains an element <code>Img_lego</code>.</p></td>
|
||||
<td><p>A 3D brickr object from a bricks_from_*() function..</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>brick_type</th>
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Color scales for bricks — scale_fill_brick • brickr</title>
|
||||
<title>Color scales for bricks - ggplot2 extension — scale_fill_brick • brickr</title>
|
||||
|
||||
<!-- favicons -->
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
|
||||
|
||||
<meta property="og:title" content="Color scales for bricks — scale_fill_brick" />
|
||||
<meta property="og:title" content="Color scales for bricks - ggplot2 extension — scale_fill_brick" />
|
||||
|
||||
<meta property="og:description" content="brickr counterpart to ggplot2::scale_fill_discrete() to map bar colors to the palette of LEGO mold colors." />
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -123,8 +123,8 @@
|
||||
<div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header">
|
||||
<h1>Color scales for bricks</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/scale_brick.R'><code>R/scale_brick.R</code></a></small>
|
||||
<h1>Color scales for bricks - ggplot2 extension</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/scale-brick.R'><code>R/scale-brick.R</code></a></small>
|
||||
<div class="hidden name"><code>scale_fill_brick.Rd</code></div>
|
||||
</div>
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
<td><p>Color palette for bricks. Same as <code><a href='theme_brick.html'>brickr::theme_brick()</a></code>. Options include:
|
||||
<code><a href='https://www.rdocumentation.org/packages/base/topics/c'> c("classic", "hp", "sw_light", "sw_dark", "friends", "elves",
|
||||
"ninja", "classy", "city", "ocean", "movie", "space",
|
||||
"jurassic", "duplo", "superhero",
|
||||
"jurassic", "duplo", "superhero", "80s",
|
||||
"rainbow7", "rainbow13", "doublerainbow", "blue")</a></code>.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -199,7 +199,7 @@ as output</p></li>
|
||||
<pre class="examples"><div class='input'><span class='no'>df</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/data.frame'>data.frame</a></span>(<span class='kw'>trt</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"a"</span>, <span class='st'>"b"</span>, <span class='st'>"c"</span>), <span class='kw'>outcome</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>2.3</span>, <span class='fl'>1.9</span>, <span class='fl'>3.2</span>))
|
||||
<span class='no'>p</span> <span class='kw'><-</span> <span class='fu'>ggplot</span>(<span class='no'>df</span>, <span class='fu'>aes</span>(<span class='no'>trt</span>, <span class='no'>outcome</span>)) +
|
||||
<span class='fu'><a href='geom_brick_col.html'>geom_brick_col</a></span>(<span class='fu'>aes</span>(<span class='kw'>fill</span> <span class='kw'>=</span> <span class='no'>trt</span>)) +
|
||||
<span class='fu'><a href='coord_brick.html'>coord_brick</a></span>()
|
||||
<span class='fu'><a href='coord-brick.html'>coord_brick</a></span>()
|
||||
|
||||
<span class='no'>p</span> + <span class='fu'>scale_fill_brick</span>()</div><div class='img'><img src='scale_fill_brick-1.png' alt='' width='700' height='433' /></div><div class='input'>
|
||||
<span class='co'>#Select a brick_theme and use with theme_brick()</span>
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9010</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Brick color themes — theme_brick • brickr</title>
|
||||
<title>Brick color themes - ggplot2 extension — theme_brick • brickr</title>
|
||||
|
||||
<!-- favicons -->
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
||||
@@ -37,9 +37,9 @@
|
||||
|
||||
|
||||
|
||||
<meta property="og:title" content="Brick color themes — theme_brick" />
|
||||
<meta property="og:title" content="Brick color themes - ggplot2 extension — theme_brick" />
|
||||
|
||||
<meta property="og:description" content="Brick color themes" />
|
||||
<meta property="og:description" content="Brick color themes - ggplot2 extension" />
|
||||
|
||||
<meta property="og:image" content="/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
@@ -72,7 +72,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">brickr</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9009</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9011</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -123,24 +123,38 @@
|
||||
<div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header">
|
||||
<h1>Brick color themes</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/theme_brick.R'><code>R/theme_brick.R</code></a></small>
|
||||
<h1>Brick color themes - ggplot2 extension</h1>
|
||||
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/theme-brick.R'><code>R/theme-brick.R</code></a></small>
|
||||
<div class="hidden name"><code>theme_brick.Rd</code></div>
|
||||
</div>
|
||||
|
||||
<div class="ref-description">
|
||||
|
||||
<p>Brick color themes</p>
|
||||
<p>Brick color themes - ggplot2 extension</p>
|
||||
|
||||
</div>
|
||||
|
||||
<pre class="usage"><span class='fu'>theme_brick</span>(<span class='kw'>brick_theme</span> <span class='kw'>=</span> <span class='st'>"classic"</span>)</pre>
|
||||
|
||||
|
||||
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
|
||||
<table class="ref-arguments">
|
||||
<colgroup><col class="name" /><col class="desc" /></colgroup>
|
||||
<tr>
|
||||
<th>brick_theme</th>
|
||||
<td><p>Color palette for bricks. Same as <code>brickr::theme_brick()</code>. Options include:
|
||||
<code><a href='https://www.rdocumentation.org/packages/base/topics/c'> c("classic", "hp", "sw_light", "sw_dark", "friends", "elves",
|
||||
"ninja", "classy", "city", "ocean", "movie", "space",
|
||||
"jurassic", "duplo", "superhero", "80s",
|
||||
"rainbow7", "rainbow13", "doublerainbow", "blue")</a></code>.</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
<h2>Contents</h2>
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li><a href="#arguments">Arguments</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,33 +1,16 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/coord_brick.R, R/draw_key.R,
|
||||
% R/geom-brick-col.R, R/geom-brick-point.R, R/geom-brick-rect.R,
|
||||
% R/resizing_text_grob.R
|
||||
% Please edit documentation in R/coord-brick.R, R/draw-key.R,
|
||||
% R/geom-brick-col.R, R/geom-brick-rect.R
|
||||
\docType{data}
|
||||
\name{CoordBrick}
|
||||
\alias{CoordBrick}
|
||||
\alias{CoordBrickFlip}
|
||||
\alias{draw_key_brick}
|
||||
\alias{GeomBrickCol}
|
||||
\alias{GeomStud}
|
||||
\alias{GeomBrick}
|
||||
\alias{resizingTextGrob}
|
||||
\alias{drawDetails.resizingTextGrob}
|
||||
\alias{preDrawDetails.resizingTextGrob}
|
||||
\alias{postDrawDetails.resizingTextGrob}
|
||||
\title{GeomBrick}
|
||||
\format{An object of class \code{GeomStud} (inherits from \code{Geom}, \code{ggproto}, \code{gg}) of length 5.}
|
||||
\usage{
|
||||
draw_key_brick(data, params, size)
|
||||
|
||||
GeomStud
|
||||
|
||||
resizingTextGrob(...)
|
||||
|
||||
drawDetails.resizingTextGrob(x, recording = TRUE)
|
||||
|
||||
preDrawDetails.resizingTextGrob(x)
|
||||
|
||||
postDrawDetails.resizingTextGrob(x)
|
||||
}
|
||||
\description{
|
||||
ggproto for brickr geoms
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/bricks_from.R
|
||||
% Please edit documentation in R/bricks-from-tables.R
|
||||
\name{bricks_from_coords}
|
||||
\alias{bricks_from_coords}
|
||||
\title{Convert a data frame with x, y, & z coordinates & Color into bricks for 3D Model}
|
||||
\title{Convert a data frame with x, y, z & Color columns into a brickr 3D object}
|
||||
\usage{
|
||||
bricks_from_coords(coord_table, color_guide = lego_colors,
|
||||
increment_level = 0, max_level = Inf, increment_x = 0,
|
||||
@@ -32,5 +32,5 @@ bricks_from_coords(coord_table, color_guide = lego_colors,
|
||||
A list with elements \code{Img_lego} to pass to \code{collect_bricks()}.
|
||||
}
|
||||
\description{
|
||||
Convert a data frame with x, y, & z coordinates & Color into bricks for 3D Model
|
||||
Convert a data frame with x, y, z & Color columns into a brickr 3D object
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/bricks_from.R
|
||||
% Please edit documentation in R/bricks-from-tables.R
|
||||
\name{bricks_from_excel}
|
||||
\alias{bricks_from_excel}
|
||||
\title{Convert an Excel {brickr} template into a 3D model. https://github.com/ryantimpe/brickr_toybox}
|
||||
\title{Convert an Excel {brickr} template into a brickr 3D object}
|
||||
\usage{
|
||||
bricks_from_excel(excel_table, repeat_levels = 1, increment_level = 0,
|
||||
max_level = Inf, increment_x = 0, max_x = Inf, increment_y = 0,
|
||||
@@ -33,5 +33,5 @@ bricks_from_excel(excel_table, repeat_levels = 1, increment_level = 0,
|
||||
A list with elements \code{Img_lego} to pass to \code{collect_bricks()}.
|
||||
}
|
||||
\description{
|
||||
Convert an Excel {brickr} template into a 3D model. https://github.com/ryantimpe/brickr_toybox
|
||||
Convert an Excel {brickr} template into a brickr 3D object
|
||||
}
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
% Please edit documentation in R/bricks-from-mosaic.R
|
||||
\name{bricks_from_mosaic}
|
||||
\alias{bricks_from_mosaic}
|
||||
\title{Convert image output from scale_image() to bricks}
|
||||
\title{Convert a 2D LEGO mosaic into a brickr 3D object}
|
||||
\usage{
|
||||
bricks_from_mosaic(image_list, mosaic_height = 6, highest_el = "light")
|
||||
bricks_from_mosaic(mosaic_list, mosaic_height = 6,
|
||||
highest_el = "light")
|
||||
}
|
||||
\arguments{
|
||||
\item{image_list}{List output from collect_bricks() or image_to_bricks(). Contains an element \code{Img_lego}.}
|
||||
\item{mosaic_list}{List output from collect_bricks() or image_to_bricks(). Contains an element \code{Img_lego}.}
|
||||
|
||||
\item{mosaic_height}{Number of layers in the 3D image.}
|
||||
|
||||
@@ -17,5 +18,5 @@ bricks_from_mosaic(image_list, mosaic_height = 6, highest_el = "light")
|
||||
A list with elements \code{threed_elevation} and \code{threed_hillshade} to created 3D mosiacs with the \code{rayshader} package.
|
||||
}
|
||||
\description{
|
||||
Convert image output from scale_image() to bricks
|
||||
Convert a 2D LEGO mosaic into a brickr 3D object
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
% Please edit documentation in R/bricks-from-rayshader.R
|
||||
\name{bricks_from_rayshader}
|
||||
\alias{bricks_from_rayshader}
|
||||
\title{Convert image output from scale_image() to bricks}
|
||||
\title{Build a brickr 3D object from rayshader hillshade & heightmap matrices}
|
||||
\usage{
|
||||
bricks_from_rayshader(hillshade, heightmap, max_height = 12,
|
||||
img_size = 48)
|
||||
@@ -21,5 +21,5 @@ Use an array of two values for a rectangular image \code{c(width, height)}.}
|
||||
A list with elements \code{threed_elevation} and \code{threed_hillshade} to created 3D mosiacs with the \code{rayshader} package.
|
||||
}
|
||||
\description{
|
||||
Convert image output from scale_image() to bricks
|
||||
Build a brickr 3D object from rayshader hillshade & heightmap matrices
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/bricks_from.R
|
||||
% Please edit documentation in R/bricks-from-tables.R
|
||||
\name{bricks_from_table}
|
||||
\alias{bricks_from_table}
|
||||
\title{Convert a data frame in 3D matrix format into bricks for 3D Model}
|
||||
\title{Convert a matrix table into a brickr 3D object}
|
||||
\usage{
|
||||
bricks_from_table(matrix_table, color_guide = lego_colors,
|
||||
.re_level = TRUE, increment_level = 0, max_level = Inf,
|
||||
@@ -36,5 +36,5 @@ bricks_from_table(matrix_table, color_guide = lego_colors,
|
||||
A list with elements \code{Img_lego} to pass to \code{collect_bricks()}.
|
||||
}
|
||||
\description{
|
||||
Convert a data frame in 3D matrix format into bricks for 3D Model
|
||||
Convert a matrix table into a brickr 3D object
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
% Please edit documentation in R/colors-and-themes.R
|
||||
\name{build_colors}
|
||||
\alias{build_colors}
|
||||
\title{Available brick colors}
|
||||
\title{Dispaly available brick colors}
|
||||
\usage{
|
||||
build_colors(.names_only = FALSE)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/view_image.R
|
||||
% Please edit documentation in R/build-mosaic.R
|
||||
\name{build_instructions}
|
||||
\alias{build_instructions}
|
||||
\title{Create instruction manual for 2D image mosaics}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/view_image.R
|
||||
% Please edit documentation in R/build-mosaic.R
|
||||
\name{build_mosaic}
|
||||
\alias{build_mosaic}
|
||||
\title{Display 2D mosaic output as a plot image}
|
||||
\title{Display 2D LEGO mosaic as a plot image}
|
||||
\usage{
|
||||
build_mosaic(image_list, title = NULL)
|
||||
}
|
||||
@@ -12,5 +12,5 @@ build_mosaic(image_list, title = NULL)
|
||||
\item{title}{Optional title to include above plotted mosaic.}
|
||||
}
|
||||
\description{
|
||||
Display 2D mosaic output as a plot image
|
||||
Display 2D LEGO mosaic as a plot image
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/piece_count.R
|
||||
% Please edit documentation in R/piece-count.R
|
||||
\name{build_pieces}
|
||||
\alias{build_pieces}
|
||||
\title{Graphically display required bricks.}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/piece_count.R
|
||||
\name{table_pieces}
|
||||
\alias{table_pieces}
|
||||
% Please edit documentation in R/piece-count.R
|
||||
\name{build_pieces_table}
|
||||
\alias{build_pieces_table}
|
||||
\title{Generate required bricks as a data frame.}
|
||||
\usage{
|
||||
table_pieces(image_list)
|
||||
build_pieces_table(image_list)
|
||||
}
|
||||
\arguments{
|
||||
\item{image_list}{List output from collect_bricks() or image_to_bricks(). Contains an element \code{Img_lego}.}
|
||||
@@ -2,7 +2,7 @@
|
||||
% Please edit documentation in R/colors-and-themes.R
|
||||
\name{build_themes}
|
||||
\alias{build_themes}
|
||||
\title{Available brick themes for scale_fill_brick()}
|
||||
\title{Display available brick themes for ggplot feature scale_fill_brick()}
|
||||
\usage{
|
||||
build_themes(show_themes = "all", .names_only = FALSE)
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/collect_bricks.R
|
||||
% Please edit documentation in R/collect-bricks.R
|
||||
\name{collect_bricks}
|
||||
\alias{collect_bricks}
|
||||
\title{Collect legoize image from individual bricks into grouped bricks.}
|
||||
\title{Consolidate 1x1 bricks into larger ones of the same color. Internal function.}
|
||||
\usage{
|
||||
collect_bricks(image_list, use_bricks = NULL)
|
||||
}
|
||||
@@ -15,5 +15,5 @@ collect_bricks(image_list, use_bricks = NULL)
|
||||
A list with element \code{Img_bricks} containing a data frame of the x- & y-coordinates, R, G, B channels, and brick ID. Other helper elements.
|
||||
}
|
||||
\description{
|
||||
Collect legoize image from individual bricks into grouped bricks.
|
||||
Consolidate 1x1 bricks into larger ones of the same color. Internal function.
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/coord_brick.R
|
||||
% Please edit documentation in R/coord-brick.R
|
||||
\name{coord_brick}
|
||||
\alias{coord_brick}
|
||||
\alias{coord_brick_flip}
|
||||
\title{Cartesian coordinates for bricks}
|
||||
\title{Cartesian coordinates for bricks - ggplot2 extension}
|
||||
\usage{
|
||||
coord_brick(xlim = NULL, ylim = NULL, expand = TRUE, clip = "on")
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/geom-brick-point.R
|
||||
\name{geom_brick_point}
|
||||
\alias{geom_brick_point}
|
||||
\title{ggplot2 Points, as Bricks}
|
||||
\usage{
|
||||
geom_brick_point(mapping = NULL, data = NULL, stat = "identity",
|
||||
position = "identity", ..., label = "LEGO",
|
||||
simplified_threshold = 24, size = 1, stud_scale = 6/5,
|
||||
linejoin = "mitre", na.rm = FALSE, show.legend = NA,
|
||||
inherit.aes = TRUE)
|
||||
}
|
||||
\arguments{
|
||||
\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}} or
|
||||
\code{\link[=aes_]{aes_()}}. If specified and \code{inherit.aes = TRUE} (the
|
||||
default), it is combined with the default mapping at the top level of the
|
||||
plot. You must supply \code{mapping} if there is no plot mapping.}
|
||||
|
||||
\item{data}{The data to be displayed in this layer. There are three
|
||||
options:
|
||||
|
||||
If \code{NULL}, the default, the data is inherited from the plot
|
||||
data as specified in the call to \code{\link[=ggplot]{ggplot()}}.
|
||||
|
||||
A \code{data.frame}, or other object, will override the plot
|
||||
data. All objects will be fortified to produce a data frame. See
|
||||
\code{\link[=fortify]{fortify()}} for which variables will be created.
|
||||
|
||||
A \code{function} will be called with a single argument,
|
||||
the plot data. The return value must be a \code{data.frame}, and
|
||||
will be used as the layer data.}
|
||||
|
||||
\item{stat}{The statistical transformation to use on the data for this
|
||||
layer, as a string.}
|
||||
|
||||
\item{position}{Position adjustment, either as a string, or the result of
|
||||
a call to a position adjustment function.}
|
||||
|
||||
\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}. These are
|
||||
often aesthetics, used to set an aesthetic to a fixed value, like
|
||||
\code{colour = "red"} or \code{size = 3}. They may also be parameters
|
||||
to the paired geom/stat.}
|
||||
|
||||
\item{na.rm}{If \code{FALSE}, the default, missing values are removed with
|
||||
a warning. If \code{TRUE}, missing values are silently removed.}
|
||||
|
||||
\item{show.legend}{logical. Should this layer be included in the legends?
|
||||
\code{NA}, the default, includes if any aesthetics are mapped.
|
||||
\code{FALSE} never includes, and \code{TRUE} always includes.
|
||||
It can also be a named logical vector to finely select the aesthetics to
|
||||
display.}
|
||||
|
||||
\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics,
|
||||
rather than combining with them. This is most useful for helper functions
|
||||
that define both data and aesthetics and shouldn't inherit behaviour from
|
||||
the default plot specification, e.g. \code{\link[=borders]{borders()}}.}
|
||||
}
|
||||
\description{
|
||||
\code{geom_point}, except points look like LEGO(R) studs
|
||||
}
|
||||
@@ -10,6 +10,59 @@ geom_brick_rect(mapping = NULL, data = NULL, stat = "identity",
|
||||
linejoin = "mitre", na.rm = FALSE, show.legend = NA,
|
||||
inherit.aes = TRUE)
|
||||
}
|
||||
\arguments{
|
||||
\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}} or
|
||||
\code{\link[=aes_]{aes_()}}. If specified and \code{inherit.aes = TRUE} (the
|
||||
default), it is combined with the default mapping at the top level of the
|
||||
plot. You must supply \code{mapping} if there is no plot mapping.}
|
||||
|
||||
\item{data}{The data to be displayed in this layer. There are three
|
||||
options:
|
||||
|
||||
If \code{NULL}, the default, the data is inherited from the plot
|
||||
data as specified in the call to \code{\link[=ggplot]{ggplot()}}.
|
||||
|
||||
A \code{data.frame}, or other object, will override the plot
|
||||
data. All objects will be fortified to produce a data frame. See
|
||||
\code{\link[=fortify]{fortify()}} for which variables will be created.
|
||||
|
||||
A \code{function} will be called with a single argument,
|
||||
the plot data. The return value must be a \code{data.frame}, and
|
||||
will be used as the layer data.}
|
||||
|
||||
\item{stat}{The statistical transformation to use on the data for this
|
||||
layer, as a string.}
|
||||
|
||||
\item{position}{Position adjustment, either as a string, or the result of
|
||||
a call to a position adjustment function.}
|
||||
|
||||
\item{...}{Other arguments passed on to \code{\link[=layer]{layer()}}. These are
|
||||
often aesthetics, used to set an aesthetic to a fixed value, like
|
||||
\code{colour = "red"} or \code{size = 3}. They may also be parameters
|
||||
to the paired geom/stat.}
|
||||
|
||||
\item{label}{Character string to include as embossed text inside brick knobs. Maximum 6 characters.}
|
||||
|
||||
\item{simplified_threshold}{Maximum number of knobs on the plot before embossed label is suppressed.}
|
||||
|
||||
\item{label_scale}{Scale text size of label as a percentage.}
|
||||
|
||||
\item{use_bricks}{Array of brick sizes to use in mosaic. Defaults to \code{c('4x2', '2x2', '3x1', '2x1', '1x1')}`.}
|
||||
|
||||
\item{na.rm}{If \code{FALSE}, the default, missing values are removed with
|
||||
a warning. If \code{TRUE}, missing values are silently removed.}
|
||||
|
||||
\item{show.legend}{logical. Should this layer be included in the legends?
|
||||
\code{NA}, the default, includes if any aesthetics are mapped.
|
||||
\code{FALSE} never includes, and \code{TRUE} always includes.
|
||||
It can also be a named logical vector to finely select the aesthetics to
|
||||
display.}
|
||||
|
||||
\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics,
|
||||
rather than combining with them. This is most useful for helper functions
|
||||
that define both data and aesthetics and shouldn't inherit behaviour from
|
||||
the default plot specification, e.g. \code{\link[=borders]{borders()}}.}
|
||||
}
|
||||
\description{
|
||||
\code{geom_rect}, except bars look like LEGO(R) bricks.
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
% Please edit documentation in R/image-to-mosaic.R
|
||||
\name{image_to_mosaic}
|
||||
\alias{image_to_mosaic}
|
||||
\title{Convert image raster array to a LEGO-esque mosaic. Wrapper function.}
|
||||
\title{Create a 2D LEGO mosaic from an image array}
|
||||
\usage{
|
||||
image_to_mosaic(img, img_size = 48, color_table = NULL,
|
||||
method = "cie94", color_palette = c("universal", "generic",
|
||||
@@ -39,5 +39,5 @@ Use "bw" for only grayscale bricks. Ignored if a \code{color_table} is supplied.
|
||||
A list with element \code{Img_lego} containing a data frame of the x- & y-coordinates, R, G, B channels, and mapped color of each brick (pixel).
|
||||
}
|
||||
\description{
|
||||
Convert image raster array to a LEGO-esque mosaic. Wrapper function.
|
||||
Create a 2D LEGO mosaic from an image array
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
% Please edit documentation in R/image-to-prep-mosaic.R
|
||||
\name{image_to_scaled}
|
||||
\alias{image_to_scaled}
|
||||
\title{Scale an image raster array to a small number of pixels. Process into a data frame.}
|
||||
\title{Scale an image raster array to a small number of pixels. Process into a data frame. Internal function.}
|
||||
\arguments{
|
||||
\item{image}{A raster array from an image.}
|
||||
|
||||
@@ -17,5 +17,5 @@ Use an array of two values for a rectangular image \code{c(width, height)}.}
|
||||
A list with element \code{Img_scaled} containing a data frame of the x- & y-coordinates, R, G, B channels, and hex color of each brick (pixel).
|
||||
}
|
||||
\description{
|
||||
Scale an image raster array to a small number of pixels. Process into a data frame.
|
||||
Scale an image raster array to a small number of pixels. Process into a data frame. Internal function.
|
||||
}
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
% Please edit documentation in R/build-bricks.R
|
||||
\name{layer_from_bricks}
|
||||
\alias{layer_from_bricks}
|
||||
\title{Helper function to convert a level from a 3D model into a rayshader-friendly object.}
|
||||
\title{Display a brickr object as a 3D model}
|
||||
\usage{
|
||||
layer_from_bricks(brick_list, brick_type = "brick", lev = 1,
|
||||
brick_res = "sd")
|
||||
}
|
||||
\arguments{
|
||||
\item{brick_list}{List output from table_to_bricks(). Contains an element \code{Img_lego}.}
|
||||
\item{brick_list}{A 3D brickr object from a bricks_from_*() function..}
|
||||
|
||||
\item{brick_type}{Type of brick to use. Default is 'brick'. Other option is 'plate', which is 1/3 the height of a brick.}
|
||||
|
||||
@@ -21,5 +21,5 @@ Enter a value for a custom resolution. High resolutions take longer to render.}
|
||||
A list with elements \code{threed_elevation} and \code{threed_hillshade} to created 3D mosiacs with the \code{rayshader} package.
|
||||
}
|
||||
\description{
|
||||
Helper function to convert a level from a 3D model into a rayshader-friendly object.
|
||||
Display a brickr object as a 3D model
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/scale_brick.R
|
||||
% Please edit documentation in R/scale-brick.R
|
||||
\name{scale_fill_brick}
|
||||
\alias{scale_fill_brick}
|
||||
\title{Color scales for bricks}
|
||||
\title{Color scales for bricks - ggplot2 extension}
|
||||
\usage{
|
||||
scale_fill_brick(brick_theme = "classic", ...)
|
||||
}
|
||||
@@ -10,7 +10,7 @@ scale_fill_brick(brick_theme = "classic", ...)
|
||||
\item{brick_theme}{Color palette for bricks. Same as \code{brickr::theme_brick()}. Options include:
|
||||
\code{ c("classic", "hp", "sw_light", "sw_dark", "friends", "elves",
|
||||
"ninja", "classy", "city", "ocean", "movie", "space",
|
||||
"jurassic", "duplo", "superhero",
|
||||
"jurassic", "duplo", "superhero", "80s",
|
||||
"rainbow7", "rainbow13", "doublerainbow", "blue")}.}
|
||||
|
||||
\item{...}{Arguments passed on to \code{discrete_scale}
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/theme_brick.R
|
||||
% Please edit documentation in R/theme-brick.R
|
||||
\name{theme_brick}
|
||||
\alias{theme_brick}
|
||||
\title{Brick color themes}
|
||||
\title{Brick color themes - ggplot2 extension}
|
||||
\usage{
|
||||
theme_brick(brick_theme = "classic")
|
||||
}
|
||||
\description{
|
||||
Brick color themes
|
||||
\arguments{
|
||||
\item{brick_theme}{Color palette for bricks. Same as \code{brickr::theme_brick()}. Options include:
|
||||
\code{ c("classic", "hp", "sw_light", "sw_dark", "friends", "elves",
|
||||
"ninja", "classy", "city", "ocean", "movie", "space",
|
||||
"jurassic", "duplo", "superhero", "80s",
|
||||
"rainbow7", "rainbow13", "doublerainbow", "blue")}.}
|
||||
}
|
||||
\description{
|
||||
Brick color themes - ggplot2 extension
|
||||
}
|
||||
|
||||
@@ -130,14 +130,6 @@ gridExtra::grid.arrange(grobs = mosaics_by_dither, layout_matrix = matrix(c(1,2)
|
||||
|
||||
The input `brightness` can be used to scale up or down the RGB values of the image before color matching. The default is 1.
|
||||
|
||||
Use the `warhol` input to swap the R, G, or B channels in the original image. This can be used to create pop-art style mosaics.
|
||||
|
||||
```{r c_other}
|
||||
png::readPNG("../Images/mf_unicorn.PNG") %>%
|
||||
image_to_mosaic(32, brightness = 0.9, warhol = c(2, 3, 1))%>%
|
||||
build_mosaic()
|
||||
```
|
||||
|
||||
## 3D Mosaics
|
||||
|
||||
With [rayshader](https://www.rayshader.com/) installed, passing the mosaic object to `bricks_from_mosaic()` will render a 3D object, stacking layers of bricks on each other to create an elevated mosaic. By default, the lightest color bricks will be on top, but this can be changed using the `highest_el = 'dark'` option.
|
||||
|
||||
Reference in New Issue
Block a user