plot_2_color_area: Two-color area plot

View source: R/rbitr_helpers.R

plot_2_color_areaR Documentation

Two-color area plot

Description

Make an area plot where shading above the x-axis is white, and shading below the x-axis is dark gray.

Usage

plot_2_color_area(dataframe, x_name, y_name, background = "none")

Arguments

dataframe

A 2-column data frame with numeric or integer columns, where each row is a point in the x-y plane.

x_name

A single-element character vector with the name of the column containing the x-coordinates.

y_name

A single-element character vector with the name of the column containing the y-coordinates.

background

(Default = 'none') A single-element character vector indicating the desired background. Options are 'none' or 'gradient'.

Details

The input data frame is expected to have two columns, with each row being the Cartesian coordinates of a point in the x-y plane. The function plot_2_color_area will create an area plot where the area above the x-axis is filled with white (actually light gray), and the area below the x-axis is filled with black (actually dark gray).

Value

A ggplot object that is a two-color area plot.


dryguy/rbitr documentation built on Oct. 15, 2024, 6:18 a.m.