Learn R Programming

vectools (version 0.2.0)

63_test_plots: Test Plots

Description

Simple plotting functions for testing both 2d and 3d transformations.

Usage

polyplot (ps, …,
    main,
    grid=TRUE, add=FALSE, transpose=FALSE,
    xlim=c(-5, 5), ylim=c(-5, 5),
    line.color="black", fill.color="lightblue")

cubplot (ps, …, transpose=FALSE, xlim=c(-5, 5), ylim=c(-5, 5), zlim=c(-5, 5), line.color="black")

Arguments

ps

A matrix or MatrixArray object. By default: In polyplot, each matrix should be a two-column matrix, representing points around a polygon. In cubplot, each matrix should be equal to cubps, or a transformed version of it, via standard geometric transformation matrices. Note that the first polygon (matrix) is plotted first, and the second polygon is plotted second, and so on.

main

String, the main title.

grid

Logical, add grid lines.

add

Logical, if true, plot the polygons on top of an existing plot.

transpose

Logical, if true, use the transpose of each matrix.

xlim, ylim, zlim

Numeric vectors of length two, giving the x, y and z ranges.

line.color, fill.color

Character vectors of length one, or the length of p, giving the the line and fill colors.

Ignored.

See Also

MatrixArray

Binary Operators This describes how to perform operations on MatrixArray objects.

Pre-Multiplication Transformation Matrices

Post-Multiplication Transformation Matrices

sqps, cubps

Examples

Run this code
# NOT RUN {
########################################
#refer to:
#Pre-Multiplication or Post-Multiplication
#for better examples
########################################
polyplot (sqps %]*% brot2 (pi / 8) )
# }

Run the code above in your browser using DataLab