Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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

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

Examples

########################################
#refer to:
#Pre-Multiplication or Post-Multiplication
#for better examples
########################################
polyplot (sqps %]*% brot2 (pi / 8) )

vectools

Advanced Vector Toolkit

v0.2.0
GPL (>= 2)
Authors
Abby Spurdle
Initial release
2020-10-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.