Display a categorized reference of all available plot functions in ggforge. Helps users and AI agents discover which function to use for their data.
When category exactly matches a function name (case-insensitive),
a detailed quick-reference card is printed instead.
Usage
ggforge_gallery(category = NULL, format = c("display", "data"), browse = FALSE)Arguments
- category
Optional character string to filter by category or look up a specific function name. Available categories: "statistical", "enrichment", "single-cell", "genomics", "clinical", "network", "specialized", "earth", "meta", "ecology", "physics", "3d", "ml". If NULL (default), shows all categories.
- format
Character;
"display"(default) prints formatted terminal output,"data"returns a visible data.frame.- browse
If TRUE, opens the pkgdown reference page in a web browser. Default is FALSE.
Value
When format = "data", a visible data.frame with columns:
function_name, category, description, required_params, key_params.
Otherwise invisibly returns the same data.frame.
Examples
# Show all available plot functions
ggforge_gallery()
#> Statistical Plots
#> -----------------
#> ScatterPlot(data, x, y) Scatter plot with size/color mapping, highlighting, and transformations
#> LinePlot(data, x) Line plot with error bars, trend lines, and grouped lines
#> BarPlot(data, x) Bar plot with grouping, stacking, labels, and trend overlay
#> BoxPlot(data, x) Box plot with comparisons, paired data, and trend lines
#> ViolinPlot(data, x) Violin plot with box overlay, comparisons, and paired data
#> BeeswarmPlot(data) Beeswarm (bee swarm) plot with jittered points
#> DensityPlot(data, x) Density plot with grouped distributions
#> JitterPlot(data, x) Jitter/strip plot with comparisons and highlighting
#> AreaPlot(data, x) Stacked area plot showing composition over categories
#> Histogram(data, x) Histogram with grouped distributions
#> QQPlot(data, val) QQ plot for distribution comparison
#> TrendPlot(data, x) Trend plot combining area and bar visualizations
#> RidgePlot(data) Ridge plot (joy plot) for comparing distributions
#> DotPlot(data, x, y) Dot plot with size/color encoding for matrix-like data
#> LollipopPlot(data, x, y) Lollipop plot (dot-and-stem chart)
#> WaterfallPlot(data, x, y) Waterfall plot for ranked values
#> SplitBarPlot(data, x, y) Split/stacked bar plot for composition analysis
#> DumbbellPlot(data, x_start, x_end, y) Dumbbell plot for before/after or paired comparisons
#> StreamGraph(data, x, y, group_by) Stream (river) graph for composition changes over time
#> TreemapPlot(data, area) Treemap for hierarchical proportional data
#> ParallelCoordPlot(data, columns) Parallel coordinates for multivariate comparison
#> WafflePlot(data, x) Waffle chart (square pie) for proportional data
#> TimelinePlot(data, start) Timeline/Gantt chart for events over time
#>
#> Enrichment & Pathway
#> --------------------
#> EnrichMap(data) Network map of enrichment terms with similarity clustering
#> EnrichNetwork(data) Network connecting enrichment terms to their genes
#> GSEASummaryPlot(data) Summary bar/dot plot of GSEA results
#> GSEAPlot(data) Running enrichment score plot for a single gene set
#>
#> Single-Cell & Spatial
#> ---------------------
#> DimPlot(data) Dimension reduction plot (UMAP/t-SNE/PCA) with clustering
#> FeatureDimPlot(data, features) Feature expression overlay on dimension reduction
#> VelocityPlot(embedding, v_embedding) RNA velocity field visualization (raw/grid/stream)
#> SpatImagePlot(data) Spatial raster image plot
#> SpatPointsPlot(data) Spatial point plot for cell coordinates
#> SpatShapesPlot(data) Spatial shape/polygon plot (SpatVector)
#> SpatMasksPlot(data) Spatial mask overlay plot
#> TrajectoryPlot(data) Pseudotime trajectory on dimension reduction
#> StackedViolinPlot(data, features, group_by) Stacked violins for multi-feature marker visualization
#>
#> Genomics
#> --------
#> VolcanoPlot(data, x, y) Volcano plot for differential expression with labeling
#> ManhattanPlot(data, chr_by, pos_by, pval_by) Manhattan plot for GWAS results
#> VennDiagram(data) Venn diagram for set overlaps (2-7 sets)
#> UpsetPlot(data) UpSet plot for complex set intersections
#>
#> Clinical & Prediction
#> ---------------------
#> KMPlot(data, time, status) Kaplan-Meier survival curve with risk table and p-value
#> CoxPlot(data) Cox regression forest plot (simple and detailed)
#> ROCCurve(data, truth_by, score_by) ROC curve with AUC and optimal cutoff
#> NomogramPlot(model) Nomogram for clinical prediction models
#> CalibrationPlot(data, predicted, observed) Calibration curve for model performance assessment
#> DecisionCurvePlot(data, outcome, predictors) Decision curve analysis (DCA) for clinical utility
#>
#> Networks & Relationships
#> ------------------------
#> CorPlot(data, x, y) Correlation matrix heatmap with significance
#> CorPairsPlot(data) Correlation pairs plot for pairwise relationships
#> ChordPlot(data) Chord diagram for directional relationships
#> SankeyPlot(data, x) Sankey/alluvial diagram for flow data
#> AlluvialPlot(data, x) Alluvial plot for categorical data flow
#> Network(links) Network graph with customizable nodes and edges
#>
#> Specialized Plots
#> -----------------
#> Heatmap(data) ComplexHeatmap wrapper with annotations and clustering
#> RadarPlot(data, x) Radar/spider chart for multivariate comparison
#> PieChart(data, x) Pie chart with label positioning
#> RingPlot(data) Ring/donut chart for proportional data
#> WordCloudPlot(data) Word cloud from text or frequency data
#> RarefactionPlot(data) Rarefaction curve for species diversity
#> ClustreePlot(data, prefix) Cluster resolution tree for single-cell clustering
#> CircosPlot(data) Circos plot for circular data visualization
#> DendrogramPlot(data) Dendrogram for hierarchical clustering visualization
#> SunburstPlot(data, labels, parents, values) Sunburst chart for hierarchical data (plotly)
#>
#> Earth & Environmental
#> ---------------------
#> ContourPlot(data, x, y, z) Contour plot (filled/lines) for 2D scalar fields
#> TernaryPlot(data, a, b, c) Ternary diagram for three-component compositional data
#> PolarPlot(data, theta) Polar/wind rose plot for angular data
#> MapPlot(data) Geographic map (choropleth or point map)
#>
#> Meta-Analysis & Agreement
#> -------------------------
#> ForestPlot(data, estimate, ci_lower, ci_upper) Forest plot for meta-analysis (OR/RR/SMD/HR)
#> FunnelPlot(data, estimate, se) Funnel plot for publication bias assessment
#> BlandAltmanPlot(data, method1, method2) Bland-Altman plot for method agreement
#>
#> Ecology & Evolution
#> -------------------
#> OrdinationPlot(data, x, y) Ordination biplot (NMDS/PCoA/RDA) with arrows and ellipses
#> PhyloTreePlot(tree) Phylogenetic tree (rectangular/circular/fan layout)
#> RankAbundancePlot(data, species, abundance) Rank-abundance (Whittaker) curve for community structure
#>
#> Physics & Engineering
#> ---------------------
#> QuiverPlot(data, x, y, u, v) Quiver (vector field) plot for 2D vectors
#> StreamlinePlot(data, x, y, u, v) Streamline plot for flow field visualization
#>
#> 3D & Interactive
#> ----------------
#> Scatter3D(data, x, y, z) 3D scatter plot (plotly) with color/size mapping
#> Surface3D(z) 3D surface plot (plotly) with colorscale
#>
#> Machine Learning
#> ----------------
#> ConfusionMatrixPlot(data, truth, predicted) Confusion matrix heatmap with accuracy annotation
#>
#> 77 plot functions available. Use ?FunctionName or ggforge_gallery("FunctionName") for details.
#> Online docs: https://zaoqu-liu.github.io/ggforge/reference/
# Show only survival & clinical plots
ggforge_gallery("clinical")
#> Clinical & Prediction
#> ---------------------
#> KMPlot(data, time, status) Kaplan-Meier survival curve with risk table and p-value
#> CoxPlot(data) Cox regression forest plot (simple and detailed)
#> ROCCurve(data, truth_by, score_by) ROC curve with AUC and optimal cutoff
#> NomogramPlot(model) Nomogram for clinical prediction models
#> CalibrationPlot(data, predicted, observed) Calibration curve for model performance assessment
#> DecisionCurvePlot(data, outcome, predictors) Decision curve analysis (DCA) for clinical utility
#>
#> 6 plot functions available. Use ?FunctionName or ggforge_gallery("FunctionName") for details.
#> Online docs: https://zaoqu-liu.github.io/ggforge/reference/
# Get structured data for programmatic use
cat_df <- ggforge_gallery(format = "data")
# Quick-reference card for a specific function
ggforge_gallery("VolcanoPlot")
#> VolcanoPlot()
#> ─────────────
#> Category: Genomics
#> Description: Volcano plot for differential expression with labeling
#>
#> Required: data, x, y
#> Key params: nlabel, x_cutoff, y_cutoff, label_by, highlight
#>
#> Universal params: group_by, facet_by, split_by, palette, theme, title, subtitle, xlab, ylab, legend.position, alpha, x_text_angle, aspect.ratio
#>
#> Example:
#> VolcanoPlot(data, x = "...", y = "...")
#>
#> Use ?VolcanoPlot for full documentation.
# Open the online reference page
if (FALSE) { # \dontrun{
ggforge_gallery(browse = TRUE)
} # }
