Learn R Programming

GGenemy (version 0.1.0)

gg_audit: Comprehensive Audit of ggplot2 Visualization

Description

Runs all available audit checks on a ggplot2 object and returns a comprehensive report of potential issues and suggestions.

Usage

gg_audit(plot, checks = "all")

Value

A list with class "gg_audit_report" containing audit results

Arguments

plot

A ggplot2 object

checks

Character vector of checks to run. Default is "all". Options: "color", "scales", "text", "accessibility", "labels"

Examples

Run this code
library(ggplot2)
p <- ggplot(mtcars, aes(wt, mpg, color = factor(cyl))) +
  geom_point() +
  scale_color_manual(values = c("red", "green", "blue"))
report <- gg_audit(p)
print(report)

Run the code above in your browser using DataLab