Nothing
acontext("Segment size")
df <- data.frame(x=c(0, 0),
y=c(0, 1),
xend=c(1, 1),
yend=c(1, 0),
size=c(5, 10))
test_that("segment size translates to stroke-width", {
viz <- list(segs=ggplot()+
geom_segment(aes(x, y, xend=xend, yend=yend),
data=df, size=1))
info <- animint2HTML(viz)
## Need the ^$ so that we do not match e.g. 210.
expect_styles(info$html, list("stroke-width"="^1[a-z]*$"))
})
test_that("segment size range translates to stroke-width", {
viz <- list(segs=ggplot()+
geom_segment(aes(x, y, xend=xend, yend=yend, size=size),
data=df)+
scale_size_identity())
info <- animint2HTML(viz)
expect_styles(info$html, list("stroke-width"=c("^5[a-z]*$", "^10[a-z]*$")))
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.