Skip to contents

Generates a bubble plot for a data set.

Usage

plot_bubble(
  df,
  group = c("fishing_year", "vessel"),
  sort_order = NULL,
  sum_by = "raw",
  fill = "purple",
  alpha = 0.5,
  ylab = NA,
  xlab = NA,
  zlab = "N",
  ...
)

Arguments

df

A data.frame containing at least two columns.

group

The names of the columns in the data.frame to plot.

sort_order

A character vector containing the order of varables.

sum_by

Sum to 1 by row, sum to 1 by column, sum to 1 across all data, or raw. The size of the bubbles will be the same for all and raw, but the legend will change from numbers of records to a proportion.

fill

the colour to use in the plot, can either be a colour or a factor to colour by.

alpha

the alpha level of the bubbles.

ylab

the y axis label.

xlab

the x axis label.

zlab

the z axis label.

...

Further arguments passed to nothing.

Value

a ggplot object

Author

Darcy Webber darcy@quantifish.co.nz