Renders raster images from URLs at provided coordinates

ly_image_url(
  fig,
  x = 0,
  y = 0,
  data = figure_data(fig),
  w = 10,
  h = 10,
  image_url,
  dilate = TRUE,
  anchor = "top_left",
  angle = 0,
  lname = NULL,
  lgroup = NULL
)

Arguments

fig

figure to modify

x

x coordinates

y

y coordinates

data

an optional data frame, providing the source for inputs x, y, and other properties

w, h

values or field names of width and height of image

image_url

values or field name of image URLs

dilate

logical - whether to dilate pixel distance computations when drawing

anchor

where the image is anchored to with respect to x and y

angle

values or field name of the angle to rotate the image, in radians

lname

layer name

lgroup

layer group

See also

Examples

# \donttest{ url <- c(" http://bokeh.pydata.org/en/latest/_static/images/logo.png", "http://developer.r-project.org/Logo/Rlogo-4.png") ss <- seq(0, 2*pi, length = 13)[-1] ws <- runif(12, 2.5, 5) * rep(c(1, 0.8), 6) imgdat <- data.frame( x = sin(ss) * 10, y = cos(ss) * 10, w = ws, h = ws * rep(c(1, 0.76), 6), url = rep(url, 6) ) p <- figure(xlab = "x", ylab = "y") %>% ly_image_url(x, y, w = w, h = h, image_url = url, data = imgdat, anchor = "center") %>% ly_lines(sin(c(ss, ss[1])) * 10, cos(c(ss, ss[1])) * 10, width = 15, alpha = 0.1) p # }