Create Piper plot
Usage
piper_plot(
d,
ems_id = NULL,
group = "ems_id",
legend = TRUE,
legend_position = "topleft",
legend_title = group,
valid = TRUE,
plot_data = FALSE,
point_colour = "viridis",
point_size = 0.1,
point_filled = TRUE,
point_shape = "circle"
)
Arguments
- d
Data frame. AquaChem formatted dataset
- ems_id
Character. Ids to plot if dataset includes more than one
- group
Character. Column by which to group data for colour, shape, filled and size.
- legend
Logical. Whether to show the legend
- legend_position
Character or Numeric.. Location of legend. Must be one of "topleft", "topright", etc. (see ?legend for more options), OR a vector of two numeric values x, and y to specify an exact position.
- legend_title
Character. Title of legend. Defaults to
group
.- valid
Logical. Keep only valid data (charge balances <=10)
- plot_data
Logical. Whether to return plot data rather than a plot
- point_colour
Character. Colour or colours by which to colour points. Either a single value (applied to all), or a vector of values the same length as the number of
groups
. Can also be "viridis", which will use the viridis colour scale.- point_size
Numeric. Point size. Either a single value (applied to all), or a vector of values the same length as the number of
groups
.- point_filled
Logical. Whether to fill point shapes or not. Either a single value (applied to all), or a vector of values the same length as the number of
groups
.- point_shape
Character. Shape of points to use. Valid options are "circle", "square" or "triangle". Either a single value (applied to all), or a vector of values the same length as the number of
groups
.