Nothing
context("stat_density_2d")
test_that("uses scale limits, not data limits", {
base <- ggplot(mtcars, aes(wt, mpg)) +
stat_density_2d() +
scale_x_continuous(limits = c(1, 6)) +
scale_y_continuous(limits = c(5, 40))
ret <- layer_data(base)
# Check that the contour data goes beyond data range.
# The specific values below are sort of arbitrary; but they go beyond the range
# of the data
expect_true(min(ret$x) < 1.2)
expect_true(max(ret$x) > 5.8)
expect_true(min(ret$y) < 8)
expect_true(max(ret$y) > 35)
})
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.