plotting {kyotil}R Documentation

Plotting Functions

Description

mypostscript and mypdf sets the width and height based on mfrow input.

Usage


abline.pt.slope(pt1, slope, x2=NULL, ...)

abline.pts(pt1, pt2 = NULL)

butterfly.plot(dat, dat2 = NULL, add = FALSE, xaxislabels = rep("", 4), x.ori = 0, 
    xlab = "", ylab = "", cex.axis = 1, ...)

empty.plot()

getMfrow(len)

myhist (x, add.norm=TRUE, col.norm="blue", ...)

myforestplot(dat, xlim=NULL, xlab="", main="", col.1="red", col.2="blue",
 plot.labels=TRUE,order=FALSE,decreasing=FALSE, vline=TRUE,cols=NULL,log="")

my.interaction.plot(dat, x.ori = 0, xaxislabels = rep("", 2), cex.axis = 1, add = FALSE,
    xlab = "", ylab = "", pcol = NULL, lcol = NULL, ...)

myboxplot(object, ...)

## S3 method for class 'formula'
myboxplot(formula, data, cex=.5, xlab="", ylab="", main="", box=TRUE, 
at=NULL, na.action=NULL, pch=1, col=1, test="", friedman.test.formula=NULL, 
reshape.formula=NULL, reshape.id=NULL, jitter=TRUE, add.interaction=FALSE,  
drop.unused.levels = TRUE, bg.pt=NULL, add=FALSE, ...)
    
## S3 method for class 'data.frame'
myboxplot(object, cex = 0.5, ylab = "", xlab = "", main = "", box = TRUE,
    at = NULL, pch = 1, col = 1, test = "", ...)

## S3 method for class 'list'
myboxplot(object, ...)

abline.shade.2(x, col=c(0,1,0))
abline.shade(pt, quadrant=c(1,2,3,4), col=c(0,1,0), alpha=0.3)

## S3 method for class 'glm'
VEplot(object, X1, X2, x, ...)
add.mtext.label (text, cex = 1.4, adj = -0.2) 
mydev.off(file="temp", ext = c("png,pdf"), res = 200, mydev=NULL)

mylegend(legend, x, y=NULL, lty = NULL, bty = "n", ...)

mymatplot(x, y, type = "b", lty = c(1, 2, 1, 2, 1, 2), pch =
         NULL, col = rep(c("darkgray", "black"), each = 3),
         xlab = NULL, ylab = "", draw.x.axis = TRUE, bg = NA,
         lwd = 1, at = NULL, make.legend = TRUE, legend = NULL,
         impute.missing.for.line = TRUE, legend.x = 9,
         legend.title = NULL, legend.cex = 1, legend.inset = 0,
         xaxt = "s", y.intersp = 1.5, x.intersp = 0.3, ...)
         
                          
mypairs(dat, ladder = FALSE, ...)

wtd.hist (x, breaks = "Sturges", freq = NULL, probability = !freq, 
    include.lowest = TRUE, right = TRUE, density = NULL, angle = 45, 
    col = NULL, border = NULL, main = paste("Histogram of", xname), 
    xlim = range(breaks), ylim = NULL, xlab = xname, ylab, axes = TRUE, 
    plot = TRUE, labels = FALSE, nclass = NULL, weight = NULL, 
    ...) 



myfigure(mfrow = c(1, 1), mfcol = NULL, width = NULL, 
    height = NULL, oma = NULL, mar = NULL, main.outer = FALSE, bg=NULL) 


mypdf(...)

mypng(...)
mytiff(...)

mypostscript(file = "temp", mfrow = c(1, 1), mfcol = NULL, width = NULL, 
    height = NULL, ext = c("eps", "pdf", "png", "tiff"), oma = NULL, 
    mar = NULL, main.outer = FALSE, save2file = TRUE, res = 200, 
    ...)

panel.cor(x, y, digits=2, prefix="", cex.cor, cor., ...)

panel.hist(x, ...)

panel.nothing(x, ...)

corplot(object, ...)

## Default S3 method:
corplot(object, y, ...)

## S3 method for class 'formula'
corplot(formula, data, main = "", method = c("pearson", "spearman"), 
col=1,cex=.5,add.diagonal.line=TRUE,add.lm.fit=FALSE,col.lm=2,add.deming.fit=FALSE,
    col.deming=4,add=FALSE,log="",same.xylim=FALSE,xlim=NULL,ylim=NULL, ...)



Arguments

add.norm

Boolean, whether to add normal approximation density line

col.norm

string, color of added normal density line

pt1
ladder
slope
friedman.test.formula
reshape.id
impute.missing.for.line
cor.
mydev
jitter

Boolean

add.interaction

Boolean

...
adj
xaxt
breaks
freq
bg.pt
probability
include.lowest
right
density
angle
border
axes
plot
labels
nclass
weight
pt2
pt
quadrant
alpha
dat
lwd

line width.

x.intersp

controls the look of legend.

y.intersp

controls the look of legend.

res

resolution.

legend.inset

legend inset

dat2
add
text
log
add.lm.fit
add.deming.fit
col.lm
col.deming
reshape.formula

a formula object.

xaxislabels
x.ori
xlab
ylab
cex.axis
len
same.xylim

Boolean. Whether xlim and ylim should be the same

xlim
ylim
main
col.1
col.2
pcol
lcol
object
formula
data
cex
box
at
pch
col
test

string. For example, "t","w","f","k", "tw"

legend
x
X1
X2
lty
bty
type
make.legend
legend.x
legend.title
legend.cex
draw.x.axis
bg
method
file
mfrow
mfcol
width
height
ext
oma
mar
main.outer
save2file
y
digits
prefix
cex.cor
plot.labels

Boolean

order

Boolean

decreasing

Boolean

add.diagonal.line
x2
vline
cols
na.action
drop.unused.levels

Details

myboxplot shows data points along with boxes. The data poins are jittered and the pattern of jittering is made reproducible in repeated calls. The test can only take one type of test currently.

myforestplot is modified from code from Allan deCamp/SCHARP. dat should have three columns. first column should be point estimate, second and third lci and uci, fourth p value. col.1 is the color used for CIs that do not include null, col.2 is used for CIs that do include null. If order is TRUE, the rows are ordered by the first column of dat. descreasing can be used to change the behavior of order.

corplot.formula uses MethComp::Deming by Bendix Carstensen to fit Deming regression.

wtd.hist is copied from weights package, author: Josh Pasek.

mymatplot will use na.approx (zoo) to fill in NA before plotting in order to draw continuous lines. The filled-in values will not be shown as points.

Examples

myfigure(mfrow=c(1,2))
    plot(1:10)
    plot(1:10)
mydev.off(ext="png,pdf", file="tmp")

set.seed(1)
x=1:50+rnorm(50,0,4)
y=1:50+rnorm(50,0,4)
dat=data.frame(x, y)
corplot(y~x,dat,add.lm.fit=TRUE,add.deming.fit=TRUE,col.lm="red",col.deming="blue")


[Package kyotil version 2018.10-17 Index]