This function plots a (positive) vector with non-zero elements displayed as rectangles aligned to either left or right. The length of a rectangle is proportional to the value of the vector.
1 2 3 4 5 6 7 8 | plotVect(vect, xlim = NULL, ylim = NULL, newGraph = TRUE,
plotGrid = TRUE, gridVal = NULL, gridCex = 0.5,
startXYCoor = c(0, 0), vertical = TRUE,
alignment = c(1, 2), maxLen = 1, minLen = 0.1,
width = 0.1, breakLen = 0.5,
labels = as.character(vect), labelMaxLen = 15,
labelCex = 0.5, col = gray(0.8), lwd = NULL,
title = "", titleCex = 1, titleXY = startXYCoor)
|
vect |
numeric vector. Data points to plot. |
xlim |
numeric vector. x-axis limits. |
ylim |
numeric vector. y-axis limits. |
newGraph |
logical. Defaults to ‘TRUE’, which creates a new graph. |
plotGrid |
logical. Set to ‘TRUE’ to plot grid lines. |
gridVal |
numeric vector. Location of grid lines. |
gridCex |
numeric. Grid label text magnification. |
startXYCoor |
numeric vector. Starting points for X-
and Y-coordinates. Defaults to |
vertical |
logical. Defaults to ‘TRUE’, grid lines are vertical. |
alignment |
numeric vector. Set alignment. If
|
maxLen |
numeric. Defaults to ‘1’. |
minLen |
numeric. Defaults to ‘0.1’. |
width |
numeric. Set rectangle width, defaults to ‘0.1’. |
breakLen |
numeric. Defaults to ‘0.5’. |
labels |
character vector. Labels for each data point. |
labelMaxLen |
numeric. Maximum character length for labels. |
labelCex |
numeric. Label text magnification. |
col |
character vector. Specify colors for rectangles. |
lwd |
numeric. Specify line width. |
title |
character. Title for plot. |
titleCex |
numeric. Title text magnification. |
titleXY |
numeric vector. Set X- and Y-coordinates for the title. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.