dfplot {beginr}R Documentation

Plot a dataframe, multiple ys against one x

Description

Plot a dataframe, multiple ys against one x

Usage

dfplot(x, y, add = FALSE, xlab = "", ylab = "", myaxes = FALSE, xlim = NULL, 
    ylim = NULL, mycol = NULL, mytype = "l", mypch = 20, mycex = 1, mylty = NULL, 
    lwd = 1, xerror = NULL, yerror = NULL, mycolerrorbar = NULL, mylegend = NULL, 
    mylegendcol = mycol, mylegendcex = 1, legendpos = "top")

Arguments

x

a vector

y

a vector or a dataframe with the same length as x

add

logical, whether to add this plot to the previous one

xlab

character

ylab

character

myaxes

logical, whether to display axes automatically

xlim

numeric

ylim

numeric

mycol

colours

mytype

character

mypch

numeric or character

mycex

numeric

mylty

numeric

lwd

numeric

xerror

errorbar, same dimension of x

yerror

same dimension of y

mycolerrorbar

error bar colours

mylegend

character

mylegendcol

colors

mylegendcex

numeric

legendpos

character

Value

a figure

Examples

x <- seq(0, 2 * pi, length.out = 100)
y <- data.frame(sin(x), cos(x))
yerror <- data.frame(abs(rnorm(100, sd = 0.3)), abs(rnorm(100, sd = 0.1)))
dfplot(x, y, yerror = yerror)


[Package beginr version 0.1.7 Index]