Description Usage Arguments Details Value Note Author(s) References See Also Examples
View source: R/plotKnotDiagram.R
Plot a knot or a link diagram, along with component orientation.
1 |
points3D |
an N x 3 matrix of the x, y, z coordinates of a polygonal link |
ends |
a vector of positive integers defining the separators of the polygonal link |
pca |
logical, if TRUE a Principal Component Analysis is applied to rotate the points. Generally, results in a diagram simpler to be interpreted. This is especially true for large structures. |
size |
a scaling factor s of the plot region to be used for the plot. Default 1. The plot region within the active plot window is defined by \frac{min(Δ X, Δ Y)}{s} . Values of s > 1 reduce the plot region. |
colors |
a vector of colors, one for each component. If not supplied, integers from 1 to n are used, where n is the number of link components |
return.vars |
logical, if TRUE returns the extended structure described in details. |
... |
other graphical parameters for |
Internally,this function localizes the crossings and insert auxiliary points in proximity of each undercross.
The resulting extended structure can be accessed using return.vars=TRUE
.
The use of the parameter lwd
is recommended in order to increase the line width of the overcrossings.
This can be particularly useful when large structures are represented. See the examples below.
Called for its effect. If return.vars
is TRUE, it returns a list with the following elements
points3D |
an (N+2k) x 3 matrix of the x, y, z coordinates of the extended polygonal link, where k is the number of crossings |
ends |
a vector of positive integers defining the separators of the extended polygonal link |
undercross |
a vector of positive integers defining the row in |
overcross |
a vector of positive integers defining the row in |
component |
a vector of positive integers of length N+2k where each entry i
corresponds to the component the i-th row of |
This is a low-level function.
Maurizio Rinaldi, maurizio.rinaldi@pharm.unipmn.it Federico Comoglio, federico.comoglio@bsse.ethz.ch
Weisstein, Eric W. "Knot diagram." From MathWorld–A Wolfram Web Resource, http://mathworld.wolfram.com/KnotDiagram.html
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
##Represent 12 randomly selected link diagrams
par(mfrow = c(3,4))
for(i in 1 : 12) {
link <- makeExampleKnot( k = FALSE )
link <- AlexanderBriggs(link$points3D, link$ends)
plotDiagram(link$points3D, link$ends, main = i, lwd = 1.5)
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.