Muller_plot: Draw a Muller plot of frequencies using ggplot2

View source: R/MullerPlot.R

Muller_plotR Documentation

Draw a Muller plot of frequencies using ggplot2

Description

Draw a Muller plot of frequencies using ggplot2

Usage

Muller_plot(
  Muller_df,
  colour_by = "Identity",
  palette = NA,
  add_legend = FALSE,
  xlab = NA,
  ylab = "Frequency",
  pop_plot = FALSE,
  conceal_edges = FALSE
)

Arguments

Muller_df

Dataframe created by get_Muller_df

colour_by

Character containing name of column by which to colour the plot

palette

Either a brewer palette or a vector of colours (if colour_by is categorical)

add_legend

Logical whether to show legend

xlab

Label of x axis

ylab

Label of y axis

pop_plot

Logical for whether this function is being called from Muller_pop_plot (otherwise should be FALSE)

conceal_edges

Whether try to conceal the edges between polygons (usually unnecessary or undesirable)

Value

None

Author(s)

Rob Noble, robjohnnoble@gmail.com

See Also

get_Muller_df Muller_pop_plot

Examples

# include all genotypes:
Muller_df1 <- get_Muller_df(example_edges, example_pop_df)
Muller_plot(Muller_df1)
# omit genotypes with max frequency < 0.1:
Muller_df2 <- get_Muller_df(example_edges, example_pop_df, cutoff = 0.2)
Muller_plot(Muller_df2)
# colour by a continuous variable:
Muller_df1 <- get_Muller_df(example_edges, example_pop_df)
Muller_df1$Val <- as.numeric(Muller_df1$Identity)
Muller_plot(Muller_df1, colour_by = "Val", add_legend = TRUE)


ggmuller documentation built on Feb. 16, 2023, 7:42 p.m.