plot2: plot2

Description Usage Arguments Details Value Author(s)

Description

A versatile plotting function which allows the user to: - change the background colour of the plotting region - add ticks to all 4 axes - change the labels for the x and y axes in one command - point the axis ticks inwards (make tcl positive)

Usage

1
2
3
4
5
6
7
8
  plot2(x, y = NULL, bg.col = "lightgrey", main = NULL,
    sub = NULL, ticks = c(1, 2, 3, 4), xlab = "",
    xlim = NULL, xlabels = NULL, ylab = "", ylim = NULL,
    ylabels = NULL, vablines = NULL,
    vabline.col = "darkgrey", vabline.lty = 1,
    hablines = NULL, habline.col = "darkgrey",
    habline.lty = 1, col = 1, lty = 1, lwd = 1, type = "l",
    axes = TRUE, tcl = 0.25, ...)

Arguments

x

see ?par or ?plot.

y

see ?par or ?plot.

main

see ?par or ?plot.

sub

see ?par or ?plot.

xlab

see ?par or ?plot.

ylab

see ?par or ?plot.

xlim

see ?par or ?plot.

ylim

see ?par or ?plot.

col

see ?par or ?plot.

lty

see ?par or ?plot.

lwd

see ?par or ?plot.

type

see ?par or ?plot.

tcl

commonly overlooked parameter which allows the ticks to point in (positive) or out of the plot (negative). set to NULL ro retain default behaviour.

bg.col

change the background colour. Set to NULL to retain default behaviour

ticks

which axes should have tick marks plotted?

xlabels

override the automatic labels added to x-axis. NB it's up to the user to supply either the same number of labels as normally computed by axTicks(side=1), or if more labels than spots for labels are supplied, then they are placed at 1:length(xlabels).

ylabels

as above for side=2.

Details

NB: axes are added after plotting the data using axis and title commands.

Value

none. makes a plot

Author(s)

Mark Cowley, 28 March 2006


drmjc/mjcgraphics documentation built on May 15, 2019, 2:40 p.m.