Description Usage Arguments Examples
View source: R/low-level-interface-point.R
Functions to create a scatter plot to be sent to the console or written to a file.
1 2 3 4 5 |
data |
A data frame with data to visualize. |
aes |
A character vector to indicate the columns that should be mapped.
Passed to |
names |
The names of the variables to plot. If |
geom |
The bare name of the geom to use. If |
... |
Passed to the geom. See 'Details'. |
1 2 3 4 5 6 7 8 9 10 11 | # ordinary scatter plots for continuous data
plot <- vis_2d_point(iris,
c(x = "Sepal.Width", y = "Sepal.Length", size = "Petal.Width")
)
plot %>%
dplyr::filter(purrr::map_lgl(.data$aes, ~ any(.x %in% "Sepal.Length")))
# jitter plots if both variables are categorical
mtcars %>%
transform_cols(c("vs", "am"), "as.factor") %>%
vis_2d_point(c("vs", "am"), width = 0.1, height = 0.1) %>%
pull_gg()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.