agentsclimarketplace

Ggplot2 theme customization for publication

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/ggplot2-theme-customization-for-publication

Curated, evidence-grounded skill and software-tool collections for scientific AI agents, generated by the AgenticScienceBuilder

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill ggplot2-theme-customization-for-publication

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 14 stars14 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use when you have generated a ggplot2 object from a domain-specific function (e.g., omu's plot_volcano) and need to refine its appearance for publication.

The file declares its own license as CC-BY-4.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

6.6 KB, as published. Nobody here has run it

ggplot2-theme-customization-for-publication

License: restricted — no clear open-source license detected for the underlying tool; verify licensing before commercial use or redistribution. <!-- asb-license-banner -->

Summary

Apply ggplot2 theme layers and element customization to metabolomics visualization outputs (e.g., volcano plots) to produce publication-ready figures. This skill ensures that ggplot2 objects generated by domain-specific functions remain editable and themeable, enabling consistent visual styling across comparative analyses.

When to use

You have generated a ggplot2 object from a domain-specific function (e.g., omu's plot_volcano) and need to refine its appearance for publication. Apply this skill when the base plot requires removal of gridlines, background standardization, or consistent application of a typographic theme across multiple contrasts or datasets.

When NOT to use

  • Input data has not yet been submitted to statistical testing; use data transformation and omu_summary first.
  • Aesthetic parameters (fill, color, alpha, shape) are still being adjusted; define aesthetics in the base plot call, not in theme layers.
  • You need to alter the underlying statistical geometry (e.g., point size, jitter); modify geom parameters, not theme elements.

Inputs

  • ggplot2 object (output from plot_volcano or similar omu visualization function)
  • omu_summary output with log2FoldChange and adjusted p-values
  • character vector specifying class/metabolite groupings for visual filtering (e.g., strpattern)

Outputs

  • ggplot2 object with applied theme layers and customized aesthetics suitable for publication
  • rendered figure (bitmap or vector format) after printing/exporting the themed object

How to apply

After generating a ggplot2 object from your statistical comparison output, layer theme functions sequentially onto the object. Start with a base theme (e.g., theme_bw()) to establish a clean background and typography, then apply granular element modifications (e.g., theme(panel.grid=element_blank())) to suppress or customize specific visual elements. The rationale is that ggplot2 objects are composable: each theme layer overrides or refines the previous one, allowing publication standards (minimal gridlines, consistent fonts, defined colors) to be applied uniformly without regenerating the underlying data or statistics. Ensure all aesthetic parameters (fill, color, alpha, shape) are set during the initial plot construction, then use theme layers only for non-data visual refinement.

Related tools

  • ggplot2 (theming and composable grammar of graphics framework enabling layer-based customization of visualization objects)
  • plot_volcano (omu function generating the base ggplot2 volcano plot object from omu_summary statistical output) — https://github.com/connor-reid-tiffany/Omu
  • omu_summary (upstream statistical comparison function producing log2FoldChange and adjusted p-values that serve as inputs to plot_volcano) — https://github.com/connor-reid-tiffany/Omu
  • theme_bw (ggplot2 base theme providing minimal background and gridline defaults as a starting point for publication styling)

Examples

library(ggplot2); volcano_plot <- plot_volcano(omu_summary_output, column='Class', fill=c('firebrick2','white','dodgerblue2')); volcano_themed <- volcano_plot + theme_bw() + theme(panel.grid=element_blank()); print(volcano_themed)

Evaluation signals

  • The output object is a valid ggplot2 object (class 'gg' or 'ggplot') that can be printed, saved, or further modified with additional geom or stat layers.
  • Panel gridlines are visibly absent or appropriately styled per theme specifications (inspect the rendered figure for grid element removal).
  • Aesthetic mappings (fill colors, point shapes, alpha transparency) match the parameter values supplied to the base plot call and are not altered by theme layers.
  • The figure exports cleanly to standard formats (PDF, PNG, SVG) without layer artifacts or overlapping text; verify via ggsave() or print().
  • Theme customization is reproducible: re-running the same sequence of theme() calls on the same base plot produces identical output.

Limitations

  • Theme layers only modify visual presentation; they do not alter the underlying data, statistical content, or geometric representations.
  • Complex or non-standard ggplot2 extensions (e.g., ggplot2 plugins or cowplot compositions) may not inherit all theme settings uniformly.
  • Publication venue-specific font licensing or resolution requirements may necessitate additional export parameters (dpi, family) beyond ggplot2 theming.

Evidence

  • [other] ggplot2-object-compatibility: "The figure is a ggplot2 object, so it is compatible with any ggplot2 themes"
  • [other] theme-customization-example: "Apply ggplot2 theme customization with theme_bw() and theme(panel.grid=element_blank()) to produce the final volcano plot ggplot2 object."
  • [other] plot-volcano-function: "Call plot_volcano on the omu_summary output with column='Class', strpattern=c('Organic acids', 'Carbohydrates'), fill=c('firebrick2','white','dodgerblue2'), color=c('black','black','black'),"

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.