Learn R Programming

ggpattern (version 0.1.3)

create_pattern_array: Generate an RGBA array and create a raster grob to fill the region

Description

the boundary of the shaded region will be used to generate a alpha mask so that the array conforms to the shape.

Usage

create_pattern_array(params, boundary_df, aspect_ratio, legend, type = "image")

Arguments

params

params/coords for a single element. named list or single row data.frame

boundary_df

mask for the pattern rendering

aspect_ratio

a aspect ratio of the plotting area.

legend

is the pattern being created in the legend? default FALSE. Use this flag if you want different pattern drawing behviour for the legend.

type

type of image to fill with. 'image' for a file, placeholder for an iamge from a web placeholder site, gradient for an image magick gradient

Value

rasterGrob