Learn R Programming

tabplot (version 1.3)

plot.tabplot: Plot a tabplot-object

Description

Plot a tabplot-object. The arguments of this function, which specify the layout, can also be passed on to tableplot directly. New in version 1.2 is the argument numMode, which determines how numeric variables are plot.

Usage

"plot"(x, fontsize = 10, legend.lines = 8, max_print_levels = 15, text_NA = "missing", title = NULL, showTitle = NULL, fontsize.title = 14, showNumAxes = TRUE, rotateNames = NA, relative = FALSE, numMode = "mb-sdb-ml", vp = NULL, ...)
"plot"(x, ...)

Arguments

fontsize
the (maximum) fontsize
legend.lines
the number of lines preserved for the legend
max_print_levels
maximum number of printed category labels in the legend
text_NA
text printed for the missing values category in the legend
title
title of the plot (shown if showTitle==TRUE)
showTitle
show the title. By default FALSE, unless a title is given.
fontsize.title
the fontsize of the title
showNumAxes
plots an x-axis for each numerical variable, along with grid lines (TRUE by default).
rotateNames
logical or numeric value that determines the rotation angle of the column names. If TRUE, they are rotated 90 degrees. By default, column names are rotated when the number of columns is greater than 15.
relative
boolean that determines whether relative scales are used for relative tableplots. If TRUE, then mean.diff.rel<-(mean2-mean1)/mean1*100 are used. If FALSE, then the absolute diference is taken: mean <- mean2-mean.
numMode
character value that determines how numeric values are plotted. The value consists of the following building blocks, which are concatenated with the "-" symbol. The default value is "mb-sdb-sdl". Prior to version 1.2, "MB-ML" was the default value.
sdb
sd bars between mean-sd to mean+sd are shown

sdl
sd lines at mean-sd and mean+sd are shown

mb
mean bars are shown

MB
mean bars are shown, where the color of the bar indicate completeness where positive mean values are blue and negative orange

ml
mean lines are shown

ML
mean lines are shown, where positive mean values are blue and negative orange

mean2
mean values are shown

vp
viewport to draw plot in (for instance useful to stack multiple tableplots)
...
other arguments are not used

Examples

Run this code
# load diamonds dataset from ggplot2
require(ggplot2)
data(diamonds)

tab <- tableplot(diamonds)
plot(tab, title="Shine on you Crazy Diamond!!!",
	 fontsize=12,
	 legend.lines=7,
	 fontsize.title=16)

Run the code above in your browser using DataLab