Learn R Programming

vectools (version 0.3.0)

41_plot_methods: Plot Methods

Description

Plotting methods for GeomObject(s).

These use a dual approach that supports both base graphics and grid. There are plotting methods for both 2D and 3D objects.

Usage

# S3 method for RImage
plotv(im, …)

# S3 method for Points plotv(v, …, gsys="graphics", add=FALSE, proj="xy") # S3 method for Line plotv(v, …, gsys="graphics", add=FALSE, proj="xy") # S3 method for Polygon plotv(v, …, gsys="graphics", add=FALSE, proj="xy") # S3 method for Text plotv(v, …, gsys="graphics", add=FALSE, proj="xy")

# S3 method for Grid plotv(v, …, gsys="graphics", add=FALSE, proj="xy") # S3 method for VImage plotv(v, …, gsys="graphics", add=FALSE, proj="xy")

# S3 method for ImageArray plotv(im, …, rby=TRUE, add=FALSE) # S3 method for GeomArray plotv(v, …, gsys="graphics", add=FALSE, proj="xy", sort=TRUE)

plot_RImage (im, …, gsys="graphics", xlim = c (0, 1), ylim = c (0, 1), orient = "r", add=FALSE, interpolate=FALSE)

Arguments

v

A GeomObject.

xlim, ylim

Length-two numeric vectors, giving the boundaries of the image.

gsys

String, graphics system, either "graphics" or "grid".

add

Logical, if true, add to existing plot, if false, a new plot is created.

proj

String, the projection, for 3D objects. Either "xy", "xz", "yz".

sort

Logical, if true, sort the objects, first. Note that 3D objects need to be sorted to render correctly. However, they only need to be sorted once.

interpolate

Logical, if true, interpolate.

orient

String, the orientation. Either "v" for standard vector graphics (such as plotting heatmaps), "r", for standard raster graphics, but with the vertical axis running down, or "r.flip", for the same but with the vertical axis running up. Note that "r" and "r.flip" should produce the same result, if add=FALSE.

im

An RImage (raster image) or ImageArray object.

rby

Logical, if true, plot by rows.

Ignored. Except for plot_RImage, where they're passed to the as.raster method. And also for the other plotting functions for RImage objects, where they're passed to plot_RImage, and then to the as.raster method.

Examples

Run this code
# NOT RUN {
plot (TCUBE)
# }

Run the code above in your browser using DataLab