hexVP-class: Formal class "hexVP" of a Hexagon Viewport

Description Objects from the Class Slots Methods Author(s) See Also Examples

Description

Hexagon Viewports are “value-added” grid viewports (see viewport) where the extra slots contain scaling and “embedding” information. A hexViewport is created my taking the available area in the cuurent viewport on the graphics device and maximizing the amount of area with a fied aspect ratio. The default when the shape parameter is 1, is a 1:1 aspect ratio in terms of the size of the viewport, not the scale of the x and y axis. The plotting area is centered within the existing margins and the maximum size determined. Extra area is then allocated to the margins. This viewport is replicated twice, once with clipping set to "on" and once with clipping "off". This feature can be used for toggling clipping on and off while editing the plot.

Objects from the Class

Objects are typically created by calls to hexViewport() or by low level calls of the form new("hexVP", ...).

Slots

hexVp.off:

Object of class "viewport" with clipping set to off, see viewport.

hexVp.on:

Object of class "viewport", with the same dimensions and parameters as hexVp.off, but with clipping set to on, see viewport.

hp.name:

The name of the viewport for searching a vptree

.

mar:

unit vector of four margins (typically in "lines").

fig:

unit vector of two figure sizes (typically in "npc").

plt:

unit vector of two figure sizes (typically in "npc").

shape:

The shape parameter from the plotted hexbin object.

xscale:

numeric of length two specifying x-range.

yscale:

numeric of length two specifying y-range.

Methods

These are methods accessing the slots of corresponding name.

getFig

signature(hvp = "hexVP"): ...

getMargins

signature(hvp = "hexVP"): ...

getPlt

signature(hvp = "hexVP"): ...

getXscale

signature(hvp = "hexVP"): ...

getYscale

signature(hvp = "hexVP"): ...

Author(s)

Nicholas Lewin-Koh kohnicho@comp.nus.edu.sg.

See Also

The constructor function hexViewport. hexbin, and its S4 plotting method, gplot.hexbin.

Examples

1
2
3
4
 library("grid")
 example(hexViewport, echo=FALSE)
 ## continued:
 str(P$plot.vp)

hexbin documentation built on Jan. 13, 2021, 5:37 a.m.