Description Usage Arguments Value See Also Examples
View source: R/plot_transform.R
This function plots the vectors within a matrix, multiplies the matrix by the provided transformation, then plots the result. It makes it easy to visualize even complex linear transformations on the two-dimensional plane.
1 2 3 4 5 6 7 8 9 | plot_transform(
trans,
m = diag(nrow = 2),
cols_before,
linetype_before = "solid",
cols_after,
linetype_after = "dashed",
fix_coords = FALSE
)
|
trans |
A 2 x m matrix representing the transformation to apply to m, for which multiplication by m is defined. Alternately, a list of matrices for which multiplication is defined in the conventional order. If such a list is passed, the leftmost matrix (the final transformation) must have two dimensions. |
m |
A matrix of any dimension for which multiplication by trans (or, if trans is a list, its composition) is defined. By default, the 2 x 2 identity. |
cols_before, linetype_before, cols_after, linetype_after |
Character vectors dictating the |
fix_coords |
Passed on tho plot_mat. Logical determining whether to force an even aspect ratio on the plots. Defaults to FALSE. |
A side-by-side plot, the first panel depicting the original matrix, the second the matrix after its transformation. If _m_is not two-dimensional, only a plot of the image of the transformation.
plot_mat, the function used to render the plots.
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.