Description Usage Arguments Details Value Author(s) See Also
This function creates a visualization of a linkage, with options to create a static plot or an interactive, 3D visualization.
1 2 3 4 5 6 7 8 | drawLinkage(linkage, method="svgViewR", file=NULL, animate = TRUE,
animate.duration = 1, animate.reverse = FALSE, animate.repeat = -1,
path.connect=NULL, connect.joints=TRUE, window.title='Linkage Viewer',
joint.col.fill="white", joint.col.stroke="black", joint.cex=1.5,
joint.lwd=2, point.col.fill="black", point.col.stroke="black",
point.cex=1, point.lwd=2, path.col.fill=NA, path.opacity.fill=1,
path.opacity.stroke=1, path.col.stroke="black", path.lwd = 1,
add = FALSE, ...)
|
linkage |
A linkage object. This can be the output of |
method |
The method to use in creating the visualization. The default method uses the package svgViewR to create an interactive, 3D visualization as an '.html' file that can be opened in any major web browser. The alternative method is "plot", which draws the linkage in an R graphics window (as a static visualization). Note that the "plot" method is still in development and may have limited functionality. The use of the "svgViewR" method (default) is recommended. |
file |
A filename for the '.html' file if |
animate |
A logical indicating whether the linkage should be drawn as an animation or as a static visualization with all frames superimposed. This only applies if the input parameter |
animate.duration |
The number of seconds during which the entire linkage animation will playback in the viewer. Note that for linkages with a large number of associated points processing speed may reduce the speed with which the animation can play such that the duration will actually be greater than that specified here. |
animate.reverse |
Whether the animation should play both forward and reverse. |
animate.repeat |
The number of times the animation should repeat. A value of -1 (default) causes the animation to play non-stop. |
path.connect |
A list of vectors, each of which specifies linkage-associated points to connect in sequence with a path. If this is specified in |
connect.joints |
A logical indicating whether the joints should be connected in the visualization. The connections will correspond to those specified by the input parameter |
window.title |
For |
joint.col.fill |
The fill color of the points representing linkage joints. |
joint.col.stroke |
The stroke (outline) color of the points representing linkage joints. |
joint.cex |
The size of the points representing linkage joints. |
joint.lwd |
The thickness of the stroke (outline) of the points representing linkage joints. |
point.col.fill |
The fill color of the linkage-associated points. |
point.col.stroke |
The stroke (outline) color of the linkage-associated points. |
point.cex |
The size of the linkage-associated points. |
point.lwd |
The thickness of the stroke (outline) of the linkage-associated points. |
path.col.fill |
The fill color of the paths specified by |
path.opacity.fill |
The fill opacity of the paths specified by |
path.opacity.stroke |
The stroke (outline) opacity of the paths specified by |
path.col.stroke |
The color of the stroke (outline) opacity of the paths specified by |
path.lwd |
The thickness of the stroke (outline) opacity of the paths specified by |
add |
Logical indicating whether linkage should be added to an existing visualization. This option is still in developement. |
... |
Additional parameters to be passed to plot device opening functions (e.g. 'jpeg', 'png', 'eps') in the case of |
Please see linkR Resources for a tutorial on how to use the linkR package and the linkR example gallery for several examples (code and animations) of different linkages that can be created using linkR.
NULL
Aaron Olsen
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.