freq_graph: Frequency graph

Description Usage Arguments Value Examples

View source: R/freq_graph.R

Description

Drawing frequency graph (density plot) and analyzing the out put of cmpt_auto_freq or cmpt_freq.

Usage

1
2
3
4
5
6
7
freq_graph(data, x_min = NA, x_max = NA, y_max = NA,
  uncertainty = TRUE, rug_plot = 1, graphic_theme = 1, grid = 1,
  xlab = "Age (Ma)", ylab = "frequency", grid_color = "grey30",
  area_color = "grey80", line_color = "black",
  rug_plot_color = rgb(0, 0, 0, alpha = 0.6), hist = FALSE,
  hist_bin = as.integer(50), hist_height = 0.2, hist_color = rgb(1,
  0.62, 0, alpha = 0.6), analyze = FALSE)

Arguments

data

list data of the result of functions; auto_cmpt_freq() or cmpt_freq().

x_min

numeric; the smallest end point of x axis.

x_max

numeric; the largest end point of x axis.

y_max

numeric; the largest end point of y axis.

uncertainty

logical; if TRUE (default), drawing 95 percent confident interval of the estimate line.

rug_plot

apply data points' shape of rug plot.

  • 0: no plot

  • 1: thin line plot (default)

  • 2: thin square plot. This plot should be used for discrete data, such as integer data.

  • 3: thick square plot. Also used for discrete data

graphic_theme

one of either:

  • 1: default theme, with y axis label, graph frame, and grid.

  • 2: simple theme, only with x axis in plot area.

grid

one of either (only used if graphic_theme = 1):

  • 0: no grid

  • 1: dotted grid (default)

xlab

a text style title for the x axis. Defaults to "Age (Ma)".

ylab

a text style title for the y axis, only used if graphic_theme = 1.

grid_color

the color to be used for grid, only used if graphic_theme = 1. Defaults to "grey30".

area_color

the color to be used for 95 percent confident interval area, only used if uncertainty = 1. Defaults to "grey80".

line_color

the color to be used for estimate line. Defaults to "black".

rug_plot_color

the color to be used for rug plot. Defaults to rgb(0, 0, 0, alpha = .6).

hist

logical; if TRUE, drawing histogram in plot area. Defaults to FALSE.

hist_bin

integer, larger than 0. Number of histogram bins. Only used if hist = TRUE.

hist_height

numeric, between 0 and 1. If hist_height = 1, then the height of largest bin is that of plot area. Generally, the height is hist_height times. Only used if hist = TRUE.

hist_color

the color to be used for histgrams. Defaults to rgb(1, 0.62, 0, alpha = .6). Only used if hist = TRUE.

analyze

logical; if TRUE, drawing the peak x-coordinate, largest and smallest data, and number of data. Defaults to FALSE.

Value

data.frame of the x-coordinats and height of peaks. Only returned if analyze =TRUE.

Examples

1
2
3
d <- Osayama
e <- cmpt_freq(d,rho=3,sigma=2)
freq_graph(e)

Tan-Furukawa/MCMCfreq documentation built on Feb. 7, 2020, 10:25 a.m.