logPlot: Make a nice log-log plot (base 10)

Description Usage Arguments Details Value Author(s) Examples

Description

Make a nice log-log plot (base 10), with exponent labels and logged gridlines.

Usage

1
2
3
4
5
6
7
8
9
logPlot(x, y, xlim=NULL, ylim=NULL,
	   majGrid=TRUE, minGrid=TRUE, 
	   minGrid.ticks=TRUE, 
	   majGrid.lty=2, minGrid.lty=majGrid.lty, 
	   majGrid.lwd=1, minGrid.lwd=majGrid.lwd/2, 
	   majGrid.col='lightgrey', minGrid.col=majGrid.col, 
	   xlab='', ylab='', labelType='exponent', 
	   asp=1, 
	   ...)

Arguments

x,y

the coordinates of points in the plot, not log-transformed.

xlim, ylim

optional xlim and ylim

majGrid,minGrid

logicals specifying whether to draw major and minor grids.

minGrid.ticks

logical specifying whether to draw the minor grid ticks on the axes.

majGrid.lty,majGrid.lwd,majGrid.col,minGrid.lty,minGrid.lwd,minGrid.col

line parameters for the grid.

xlab,ylab

x and y labels.

labelType

default is an exponent with base 10, otherwise just labels with the number (e.g. 0.001).

asp

the aspect ratio of the plot. Defaults to 1 because otherwise it will probably just look ugly.

...

other plotting parameters.

Details

Makes a nice log-log plot with major and minor grids, as well as nicely formatting axis labels. Works best for data that span at least one order of magnitude (for labelling).

Value

No return value.

Author(s)

Clark Richards

Examples

1
2
3
x <- abs(rnorm(1000))
y <- abs(rnorm(1000))
logPlot(x, y, xlab='x', ylab='y')

richardsc/crMisc documentation built on May 27, 2019, 7:59 a.m.