View source: R/Visualizations_general.R
create_qq_plot | R Documentation |
This function generates a quantile-quantile (QQ) plot using ggplot2.
create_qq_plot(
x,
y,
x_title = "Theoretical Quantiles",
y_title = "Sample Quantiles",
title = "QQ Plot",
theme = theme_bw(base_size = 14)
)
x |
Not used (for flexibility). |
y |
The sample data for which you want to create the QQ plot. |
x_title |
The title for the x-axis. |
y_title |
The title for the y-axis. |
title |
The title for the plot. |
A ggplot object representing the QQ plot.
set.seed(123)
sample_data <- rnorm(100)
qq_plot <- create_qq_plot(NULL, sample_data, "Custom X-axis Title", "Custom Y-axis Title", "Custom QQ Plot Title")
print(qq_plot)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.