Create quaternary simplex plot with pre-calculated similarity matrix
Source:R/ternary.R
plotTernary.simMat.Rd
Create quaternary simplex plot with pre-calculated similarity matrix
Usage
# S3 method for simMat
plotTernary(
x,
title = NULL,
veloMat = NULL,
nGrid = 10,
radius = 0.1,
dotSize = NULL,
dotShuffle = NULL,
colorArg = NULL,
labelColors = c("#3B4992FF", "#EE0000FF", "#008B45FF"),
vertexLabelSize = NULL,
vertexLabelDrift = 0.03,
axisBreak = 5,
axisTextShow = TRUE,
axisTextSize = NULL,
axisTextDrift = 0.01,
gridLineAlpha = 0.6,
arrowLinewidth = NULL,
arrowAngle = 20,
arrowLen = 0.2,
titleSize = NULL,
equilateral = TRUE,
margin = 0.1,
interactive = FALSE,
...
)
Arguments
- x
simMat object, n cells by 4 vertices, each row summing to 1.
- title
Title text of the plot. Default
NULL
.- veloMat
Aggregated velocity matrix. Output of
aggrVeloGraph
.- nGrid
Number of grids along the bottom side of the equilateral triangle. Default
10
.- radius
Arrow length of unit velocity. Lower this when arrows point outside of the coordinate. Default
0.1
.- dotSize
Dot aesthetics passed to
geom_point
. Default0.6
when not interactive,4
when interactive.- dotShuffle
Whether to shuffle the order of dots being added to the plot, useful when categorical colors are used and mixing of categories is expected. Default
NULL
does shuffle whendotColorBy
given is categorical and does not otherwise.- colorArg
A "colorArg" object, internally prepared by
plotQuaternary.default
. DefaultNULL
.- labelColors
Colors of the axis lines and vertex labels. Default
c("#3B4992FF", "#EE0000FF", "#008B45FF")
(blue, red and green)- vertexLabelSize
Size of vertex labels. Default
6
when not interactive,16
when interactive.- vertexLabelDrift
Position adjustment of the vertex labels, only applied to non-interactive view. Default
0.03
.- axisBreak
Number of breaks to be labeled along axis. Default
5
.- axisTextShow
Logical, whether to show axis text. Default
TRUE
.- axisTextSize
Size of text along each axis break. Default
4
for non-interactive view,12
for interactive view.- axisTextDrift
Position adjustment of the axis text, only applied to non-interactive view. Default
0.01
.- gridLineAlpha
Transparency of background grid lines. Default
0.6
.- arrowLinewidth
Line width of the velocity arrows. Default
0.25
for non-interactive view,2
for interactive view.- arrowAngle
Controls the angle of the arrowhead, only applied to non-interactive view. Default
20
.- arrowLen
Control length in centimetre from arrow tip to arrow tail, only applied to non-interactive view. Default
0.2
.- titleSize
Size of title text. Default
14
for non-interactive view,20
for interactive view.- equilateral
Logical, whether to always display the triangle as equilateral. Default
TRUE
.- margin
Margin allowed around of the triangle plotting region when
equilateral = TRUE
- interactive
Logical. Whether to display plotly interactive view. Default
FALSE
.- ...
Not used