Last data update: 2014.03.03

R: Null Graphical Object
grid.nullR Documentation

Null Graphical Object

Description

These functions create a NULL graphical object, which has zero width, zero height, and draw nothing. It can be used as a place-holder or as an invisible reference point for other drawing.

Usage

nullGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
         default.units = "npc",
         name = NULL, vp = NULL)
grid.null(...)

Arguments

x

A numeric vector or unit object specifying x-location.

y

A numeric vector or unit object specifying y-location.

default.units

A string indicating the default units to use if x, y, width, or height are only given as numeric vectors.

name

A character identifier.

vp

A Grid viewport object (or NULL).

...

Arguments passed to nullGrob().

Value

A null grob.

Author(s)

Paul Murrell

See Also

Grid, viewport

Examples

grid.newpage()
grid.null(name="ref")
grid.rect(height=grobHeight("ref"))
grid.segments(0, 0, grobX("ref", 0), grobY("ref", 0))

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(grid)
> png(filename="/home/ddbj/snapshot/RGM3/R_rel/result/grid/grid.null.Rd_%03d_medium.png", width=480, height=480)
> ### Name: grid.null
> ### Title: Null Graphical Object
> ### Aliases: grid.null nullGrob
> ### Keywords: dplot
> 
> ### ** Examples
> 
> grid.newpage()
> grid.null(name="ref")
> grid.rect(height=grobHeight("ref"))
> grid.segments(0, 0, grobX("ref", 0), grobY("ref", 0))
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>