Muller_plot {ggmuller}R 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)

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)

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)


[Package ggmuller version 0.5.1 Index]