View source: R/rbitr_helpers.R
plot_2_color_area | R Documentation |
Make an area plot where shading above the x-axis is white, and shading below the x-axis is dark gray.
plot_2_color_area(dataframe, x_name, y_name, background = "none")
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'. |
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).
A ggplot object that is a two-color area plot.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.