Skip to contents

Base R graphics visualization module providing fast, blazing fast, and extremely customizable data visualization solutions using pure base R graphics.

Usage

basegraphics(
  data,
  plot_type = "scatter",
  x_var,
  y_var,
  group_var,
  main_title = "",
  x_label = "",
  y_label = "",
  point_type = "16",
  point_size = 1,
  color_scheme = "default",
  add_grid = TRUE,
  add_legend = TRUE,
  bins = 15,
  show_statistics = FALSE,
  custom_limits = FALSE,
  x_min,
  x_max,
  y_min,
  y_max
)

Arguments

data

The data as a data frame.

plot_type

Type of base R plot to generate.

x_var

Variable for x-axis.

y_var

Variable for y-axis (continuous plots).

group_var

Optional grouping variable for stratified plots.

main_title

Main title for the plot.

x_label

Label for x-axis.

y_label

Label for y-axis.

point_type

Point type for scatter plots (pch parameter).

point_size

Size of points in plots (cex parameter).

color_scheme

Color scheme for grouped plots.

add_grid

Whether to add grid lines to the plot.

add_legend

Whether to add legend for grouped plots.

bins

Number of bins for histogram plots.

show_statistics

Whether to display basic statistics on the plot.

custom_limits

Whether to use custom axis limits.

x_min

Minimum value for x-axis (when custom limits enabled).

x_max

Maximum value for x-axis (when custom limits enabled).

y_min

Minimum value for y-axis (when custom limits enabled).

y_max

Maximum value for y-axis (when custom limits enabled).

Value

A results object containing:

results$instructionsa html
results$plot_descriptiona html
results$base_plotan image

Examples

# \donttest{
# Example usage:
# Scatter plot
plot(x, y, main="Scatter Plot", xlab="X Variable", ylab="Y Variable")
#> Error: object 'x' not found
# Histogram
hist(data, main="Histogram", xlab="Values")
#> Error in hist.default(data, main = "Histogram", xlab = "Values"): 'x' must be numeric
# Box plot
boxplot(data ~ group, main="Box Plot")
#> Error in eval(predvars, data, env): object 'group' not found
# }