ggdisplot: Plot scatterplot of two variables along with two density...

Description Usage Arguments Value Examples

Description

Plot scatterplot of two variables along with two density plots.

Usage

1
2
ggdisplot(df, var1, var2, color, xlim = NULL, ylim = NULL,
  xlab = NULL, ylab = NULL, ...)

Arguments

df

dataframe to work with.

var1

x variable to plot (string).

var2

y variable to plot (string).

color

factor variable for ggplot (string).

xlim

limits for x variable eg: c(1, 10).

ylim

limits for y variable eg: c(1, 10).

xlab

label for x variable.

ylab

label for y variable.

...

additional ggplot parameters.

Value

plot as returned by cowplot::plot_grid()

Examples

1
2
3
ggdisplot(iris, "Sepal.Length", "Sepal.Width", "Species")
ggdisplot(iris, "Sepal.Length", "Sepal.Width", "Species", xlim=c(1,10), ylim=c(1,10))
ggdisplot(iris, "Sepal.Length", "Sepal.Width", "Species", theme_bw())

scastlara/ggdisplot documentation built on May 15, 2019, 12:04 p.m.