RAM.plotting: Creating Plots with RAM

Description Overview ggplot2 File Types Note See Also Author(s)

Description

This help page details the standards for RAM plotting functions.

Overview

The RAM package contains many functions to produce plots and visualizations for metagenomic data. Currently, the plotting functions are grouped into 'casual' and 'publication' categories. The 'casual' plotting functions only accept a file argument and produce a .tiff file automatically. They are meant to quickly highlight certain aspects of the data, but are not meant to be published. The 'publication' quality plots accept many more graphing parameters, and should be of suitable quality for future publication. All 'publication' plots should accept the following parameters, in addition to those required to produce the plot:

Additionally, the following parameters are accepted by some functions:

For 'casual' plots, if file is not provided, the plot is displayed to the default graphics device (usually a new window), otherwise a .tiff file is created. For 'publication' plots, if neither file nor ext are provided, the plot is displayed to the default graphics device (usually a new window). If both file and ext are provided, a file of type ext is created at file. If only one of file or ext is given, an error is raised. In either case, the file extension will automatically be appended to the end of file, if file does not already end in the appropriate extension. For example, if file = ~/my/path.tiff and ext = png, the file will be called ~/my/path.tiff.png; but if file = ~/my/path.png, the file will just be called ~/my/path.png. Finally, if file = ~/my/path, the file will be called ~/my/path.png.

ggplot2

Furthermore, some of the 'publication' quality plots allow for a ggplot2 argument. If ggplot2 is TRUE, then the plot will be produced using the ggplot2 package, and a ggplot object will be returned. This allows for additional, personal customization of the plot for those who have used the package before. If ggplot2 is FALSE, then the plot will be created using the base plotting functions.

File Types

For 'publication' quality plots, the following file types are supported (use any of the following values for the ext argument): "pdf", "png", "tiff", "svg", "bmp", "jpeg".

Note

If file is given without a directrory (e.g. file = my_fancy_file), then that file will be created in the current working directory (see ?getwd and ?setwd for more information). The current default resolution is 1000 dpi for all plots.

See Also

ggplot

Author(s)

Wen Chen and Joshua Simpson.


RAM documentation built on May 2, 2019, 3:04 p.m.