powered by
Draws a grid of rectangles with colors corresponding to the values in z
z
ly_image( fig, z, rows, byrow = TRUE, x = 0, y = 0, dw = 1, dh = 1, palette = "Spectral10", dilate = FALSE, lname = NULL, lgroup = NULL )
figure to modify
matrix or vector of image values
if z is a vector, how many rows should be used in treating it as a matrix
if z is a vector, should it be turned into a matrix by row
lower left x coordinates
lower left y coordinates
image width distances
image height distances
name of color palette to use for color ramp (see here for acceptable values)
logical - whether to dilate pixel distance computations when drawing
layer name
layer group
Other layer functions: ly_abline(), ly_annular_wedge(), ly_annulus(), ly_arc(), ly_bar(), ly_bezier(), ly_boxplot(), ly_contour(), ly_crect(), ly_curve(), ly_density(), ly_hist(), ly_image_url(), ly_lines(), ly_map(), ly_multi_line(), ly_oval(), ly_patch(), ly_points(), ly_polygons(), ly_quadratic(), ly_quantile(), ly_ray(), ly_rect(), ly_segments(), ly_text(), ly_wedge()
ly_abline()
ly_annular_wedge()
ly_annulus()
ly_arc()
ly_bar()
ly_bezier()
ly_boxplot()
ly_contour()
ly_crect()
ly_curve()
ly_density()
ly_hist()
ly_image_url()
ly_lines()
ly_map()
ly_multi_line()
ly_oval()
ly_patch()
ly_points()
ly_polygons()
ly_quadratic()
ly_quantile()
ly_ray()
ly_rect()
ly_segments()
ly_text()
ly_wedge()
# NOT RUN { p <- figure(xlim = c(0, 1), ylim = c(0, 1), title = "Volcano") %>% ly_image(volcano) %>% ly_contour(volcano) p # }
Run the code above in your browser using DataLab