Draw points from a point CSV file (from ggsem Shiny app) on a ggplot object
Source:R/draw_points.R
draw_points.Rd
This function adds points onto any ggplot output (including your own plots not created from the ggsem shiny app).
Examples
library(ggplot2)
points_data <- data.frame(
x = 20, y = 300, shape = 'square', color = '#D0C5ED', size = 50,
border_color = '#9646D4', border_width = 2, alpha = 1,
locked = FALSE, lavaan = FALSE
)
p <- ggplot(mtcars) + geom_point(aes(mpg, disp))
draw_points(p, points_data, zoom_level = 1.2)