build_mosaic_dots: Display 2D LEGO mosaic as a plot image

View source: R/build_mosaic_dots.R

build_mosaic_dotsR Documentation

Display 2D LEGO mosaic as a plot image

Description

Render a plot image of the 2D DOTs tile mosaic with optional title.

Usage

build_mosaic_dots(brick_obj, title = NULL)

Arguments

brick_obj

List output from image_to_bricks(). Contains an element Img_lego.

title

Optional title to include above plotted mosaic.

Value

A single plot object to display 2D mosaic.

See Also

Other Mosaics: build_mosaic(), image_to_mosaic()

Examples


# Import a jpeg or png
 demo_file <- system.file("extdata", "demo_img.jpg",
                          package = "brickr", mustWork = TRUE)
 demo_image <- jpeg::readJPEG(demo_file)

#Build a very small 12x12 mosaic.
 
demo_image %>%
 image_to_mosaic(12) %>%
 build_mosaic_dots()
 

#Build a mosaic in the default size of 48x48 studs with title

demo_image %>%
 image_to_mosaic() %>%
 build_mosaic_dots("Demo mosaic")
 


ryantimpe/brickr documentation built on Jan. 15, 2024, 10:29 p.m.