Description Usage Arguments Author(s) Examples
This function is almost exactly the same as the ternaryplot
function in package vcd
(on which it is based) except that the ordering of the vertices has been change to bottom left/top/bottom right, and the code has been extended work for an aribtrary scoring matrix L
.
1 2 3 4 5 6 7 8 9 10 11 | tplot(x = cbind(1, 1, 1)/3, L = diag(c(1, 1, 1))/sqrt(2),
scale = 1, dimnames = NULL,
dimnames_position = c("corner", "none"),
dimnames_color = "black", id = NULL, id_color = "black",
coordinates = FALSE, grid = TRUE, grid_color = "gray",
labels = c("inside", "outside", "none"),
labels_color = "darkgray", border = "grey",
bg = "white", pch = 19, cex = 1, prop_size = FALSE,
col = "red", main = "ternary plot", sub = NULL,
newpage = TRUE, pop = TRUE, col.main = "black",
col.sub = "black", ...)
|
x |
an n-by-3 matrix of ternary forecasts. |
L |
A matrix describing the quadratic score function. (Default corresponds to the Brier score). |
scale |
row sums scale to be used. |
dimnames |
dimension labels (defaults to the column names of |
dimnames_position, dimnames_color |
position and color of dimension labels. |
id |
optional labels to be plotted below the plot symbols. |
id_color |
color of these labels. |
coordinates |
if |
grid |
if |
grid_color |
grid colour. |
labels, labels_color |
position and colour of the grid labels. |
border |
colour of the triangle border. |
bg |
triangle background. |
pch |
plotting character. Defaults to filled dots. |
cex |
a numerical value giving the amount by which plotting text and symbols should be scaled relative to the default. Ignored for the symbol size if |
prop_size |
if |
col |
plotting colour. |
main |
main title. |
sub |
a sub title. |
newpage |
if ‘TRUE’, the plot will appear on a new graphics page. |
pop |
logical; if ‘TRUE’, all newly generated viewports are popped after plotting. |
col.main |
colour for the title. |
col.sub |
colour for the sub title. |
... |
additional graphics parameters (see |
Tim Jupp (using code for vcd:ternaryplot
as source).
1 2 3 |
Loading required package: grid
Loading required package: quadprog
Loading required package: maps
Loading required package: maptools
Loading required package: sp
Checking rgeos availability: FALSE
Note: when rgeos is not available, polygon geometry computations in maptools depend on gpclib,
which has a restricted licence. It is disabled by default;
to enable gpclib, type gpclibPermit()
Loading required package: mapdata
Loading required package: dichromat
[,1] [,2] [,3]
[1,] 0.0000000 0.0000000 1.0000000
[2,] 0.0000000 0.1666667 0.8333333
[3,] 0.0000000 0.3333333 0.6666667
[4,] 0.0000000 0.5000000 0.5000000
[5,] 0.0000000 0.6666667 0.3333333
[6,] 0.0000000 0.8333333 0.1666667
[7,] 0.0000000 1.0000000 0.0000000
[8,] 0.1666667 0.0000000 0.8333333
[9,] 0.1666667 0.1666667 0.6666667
[10,] 0.1666667 0.3333333 0.5000000
[11,] 0.1666667 0.5000000 0.3333333
[12,] 0.1666667 0.6666667 0.1666667
[13,] 0.1666667 0.8333333 0.0000000
[14,] 0.3333333 0.0000000 0.6666667
[15,] 0.3333333 0.1666667 0.5000000
[16,] 0.3333333 0.3333333 0.3333333
[17,] 0.3333333 0.5000000 0.1666667
[18,] 0.3333333 0.6666667 0.0000000
[19,] 0.5000000 0.0000000 0.5000000
[20,] 0.5000000 0.1666667 0.3333333
[21,] 0.5000000 0.3333333 0.1666667
[22,] 0.5000000 0.5000000 0.0000000
[23,] 0.6666667 0.0000000 0.3333333
[24,] 0.6666667 0.1666667 0.1666667
[25,] 0.6666667 0.3333333 0.0000000
[26,] 0.8333333 0.0000000 0.1666667
[27,] 0.8333333 0.1666667 0.0000000
[28,] 1.0000000 0.0000000 0.0000000
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.