| draw_points | R Documentation |
This function overlays points to a ggplot object using data from a CSV file generated by the ggsem Shiny app or any custom dataset. Points can be styled with various shapes, colors, sizes, and orientations.
draw_points(points_data, zoom_level = 1)
points_data |
A data frame containing information about the points to be drawn. The expected columns include:
|
zoom_level |
Numeric. Adjusts the size of the points relative to the plot. Default is |
ggplot2 point layers
library(ggplot2)
points_data <- data.frame(
x = 0, y = 0, shape = 'square', color = '#1262B3', size = 12,
border_color = '#FFFFFF', border_width = 1, alpha = 1,
width_height_ratio = 1.6, orientation = 0,
lavaan = FALSE, network = FALSE, locked = FALSE,
group = 1
)
p <- ggplot()
p + draw_points(points_data, zoom_level = 1.2) +
scale_x_continuous(limits = c(0,50)) +
scale_y_continuous(limits = c(0,50))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.