blankPlot(width, top, bottom, pad = c(0, 0, 0, 0), scale = TRUE, scale.lwd = 1, scale.col = "#DDDDDD", scale.cex = 1, debug = FALSE, png = NA, pdf = NA, factor = ifelse(!is.na(png), 8, 1/9), no.par = FALSE, asp = 1,...) maxHeight(helix)
png
will have priority.
top, bot
, etc arguments,
good document dimension in pixels with png
and inches for
pdf
will be produced.
par
in the function if set to
TRUE, useful for using par
arguments such as mfrow
, etc.
par
when no.par
is FALSE, common ones include lwd, col, cex
for line width, line colour, and text size, respectively.
help('par')
for more. When no.par
is set to TRUE, this
option does nothing, and manually calling par
is required prior
to the calling of this function.
maxHeight
returns a numeric integer.
blankPlot
creates a blank plot with the given dimensions, with
minimal margins around the plot and no axis or labels. If more control
is required, using plot
directly would be more efficient. maxHeight
returns the height that the highest helix would require,
and can be used to determine top
and bottom
for
blankPlot
.
plotHelix
# Create helix and obtain height
helix <- as.helix(data.frame(1, 37, 12, 0.5))
height <- maxHeight(helix)
print(height)
# Use height to create properly sized plot
width <- attr(helix, "length")
blankPlot(width, height, 0)
# Add helix to plot
plotHelix(helix, add = TRUE)
Run the code above in your browser using DataLab