metan (version 1.2.1)

plot_ci: Plot the confidence interval for correlation

Description

This function plots the 95 correlation coefficient generated by the function corr_ci.

Usage

plot_ci(
  object,
  x.lab = NULL,
  y.lab = NULL,
  y.lim = NULL,
  y.breaks = waiver(),
  shape = 21,
  col.shape = "black",
  fill.shape = "orange",
  size.shape = 2.5,
  width.errbar = 0.5,
  main = TRUE,
  invert.axis = TRUE,
  plot_theme = theme_metan()
)

Arguments

object

An object generate by the function corr_ci()

x.lab

The label of x-axis, set to 'Pairwise combinations'. New arguments can be inserted as x.lab = 'my label'.

y.lab

The label of y-axis, set to 'Pearson's correlation coefficient' New arguments can be inserted as y.lab = 'my label'.

y.lim

The range of x-axis. Default is NULL. The same arguments than x.lim can be used.

y.breaks

The breaks to be plotted in the x-axis. Default is authomatic breaks. The same arguments than x.breaks can be used.

shape

The shape point to represent the correlation coefficient. Default is 21 (circle). Values must be between 21-25: 21 (circle), 22 (square), 23 (diamond), 24 (up triangle), and 25 (low triangle).

col.shape

The color for the shape edge. Set to black.

fill.shape

The color to fill the shape. Set to orange.

size.shape

The size for the shape point. Set to 2.5.

width.errbar

The width for the errorbar showing the CI.

main

The title of the plot. Set to main = FALSE to ommite the plot title.

invert.axis

Should the names of the pairwise correlation appear in the y-axis?

plot_theme

The graphical theme of the plot. Default is plot_theme = theme_metan(). For more details, see theme.

Value

An object of class gg, ggplot.

Examples

Run this code
# NOT RUN {
library(metan)
library(dplyr)

data_ge2 %>%
select(contains('E')) %>%
corr_ci() %>%
plot_ci()

# }

Run the code above in your browser using DataLab