theme_genes: A 'ggplot2' theme for drawing gene maps

View source: R/theme_genes.R

theme_genesR Documentation

A 'ggplot2' theme for drawing gene maps

Description

This theme removes extraneous plot elements for drawing an 'arrows-on-a-string' style gene map in 'ggplot2'.theme_genes_flipped() is like theme_genes(), but for flipped coordinates.

Usage

theme_genes()

theme_genes_flipped()

Details

This theme removes strip text (the text that labels facets when you use ggplot2::facet_wrap() or ggplot::facet_grid()). This makes it easier to draw molecules on different x scales by setting the y aesthetic to the molecule, then faceting with facet_grid( ~ molecule, scales = "free").

See Also

geom_gene_arrow()

Examples


ggplot2::ggplot(example_genes, ggplot2::aes(xmin = start, xmax = end,
                                            y = molecule, fill = gene)) +
geom_gene_arrow() +
ggplot2::facet_wrap(~ molecule, scales = "free") +
theme_genes()


gggenes documentation built on Sept. 8, 2023, 5:43 p.m.