EVOLUTION-MANAGER
Edit File: gtable_add_space.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Add row/column spacing.</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for gtable_add_space {gtable}"><tr><td>gtable_add_space {gtable}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Add row/column spacing.</h2> <h3>Description</h3> <p>Adds <code>width</code> space between the columns or <code>height</code> space between the rows, effictvely pushing the existing cells apart. </p> <h3>Usage</h3> <pre> gtable_add_col_space(x, width) gtable_add_row_space(x, height) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>a gtable object</p> </td></tr> <tr valign="top"><td><code>width</code></td> <td> <p>a vector of units of length 1 or ncol - 1</p> </td></tr> <tr valign="top"><td><code>height</code></td> <td> <p>a vector of units of length 1 or nrow - 1</p> </td></tr> </table> <h3>Value</h3> <p>A gtable with the additional rows or columns added </p> <h3>See Also</h3> <p>Other gtable manipulation: <code><a href="gtable_add_cols.html">gtable_add_cols</a></code>, <code><a href="gtable_add_grob.html">gtable_add_grob</a></code>, <code><a href="gtable_add_padding.html">gtable_add_padding</a></code>, <code><a href="gtable_add_rows.html">gtable_add_rows</a></code>, <code><a href="gtable_filter.html">gtable_filter</a></code> </p> <h3>Examples</h3> <pre> library(grid) rect <- rectGrob() rect_mat <- matrix(rep(list(rect), 9), nrow = 3) gt <- gtable_matrix("rects", rect_mat, widths = unit(rep(1, 3), "null"), heights = unit(rep(1, 3), "null")) plot(gt) # Add spacing between the grobs # same height between all rows gt <- gtable_add_row_space(gt, unit(0.5, "cm")) # Different width between the columns gt <- gtable_add_col_space(gt, unit(c(0.5, 1), "cm")) plot(gt) </pre> <hr /><div style="text-align: center;">[Package <em>gtable</em> version 0.3.0 <a href="00Index.html">Index</a>]</div> </body></html>