| plot | R Documentation |
plot draws a Hasse diagram for a family of sets or a surmise relation.
## S3 method for class 'kmfamset'
plot(
x,
...,
horizontal = FALSE,
colors = NULL,
keepNames = TRUE,
itemsep = ",",
braces = TRUE,
vertexshape = "oval",
arrowhead = "none",
arrowtail = "none",
edgelabel = FALSE,
verbose = 0
)
## S3 method for class 'kmneighbourhood'
plot(
x,
...,
horizontal = FALSE,
colors = c("#eeee00", "#aaccff", "#bbffbb"),
keepNames = TRUE,
itemsep = ",",
braces = TRUE,
vertexshape = "oval",
arrowhead = "none",
arrowtail = "none",
edgelabel = FALSE,
state,
verbose = 0
)
## S3 method for class 'kmsurmiserelation'
plot(
x,
...,
horizontal = FALSE,
colors = NULL,
keepNames = TRUE,
vertexshape = "circle",
arrowhead = "none",
arrowtail = "none",
verbose = 0
)
x |
Binary matrix representing a family of sets |
... |
Optional inherited parameters |
horizontal |
Boolean defining orientation of the graph, default FALSE |
colors |
Color value or vector (default NULL). |
keepNames |
Keep item names (default TRUE) |
itemsep |
Item separator in sets (default ','; only for families of states) |
braces |
Put braces around vertices (default TRUE; only for families of states) |
vertexshape |
Shape of the vertex objects, e.g. circle, oval, box, or none. See Graphviz Node Shapes for a complete list of possible values. |
arrowhead |
Form of the arrow head, e.g. vee or none (default). See Graphviz Arrow Types for a complete list of possible values. This may be used for vertical graphs although none is the standard there. |
arrowtail |
Form of the arrow tail, e.g. vee or none (default). See Graphviz Arrow Types for a complete list of possible values. This should be used for horizontal graphs. |
edgelabel |
Boolean whether to label the edges of the diagram (default FALSE) |
verbose |
Verbosity level (0 (default), 1, or 2) |
state |
Knowledge state whose neighbourhood is to be pictured |
plot takes a matrix representing a family of sets (knowledge states)
or a surmise relation and a color vector, and draws a Hasse diagram.
If the color vector is NULL the states are drawn in green, the items in
the relation are drawn in orange.
For a surmise relation, if there are equivalent items, they are contracted into one vertex labelled 'a ~ b ~ ...' for equivalent items a, b, ...
If the plot is to be used within a Shiny app, it must be included with
grVizOutput() and renderGrViz() from the DiagrammeR
package (plotOutput() and renderPlot() do not work).
Please note that, for equivalent items in a relation plot, the prerequisites are lost.
Other Plotting knowledge structures:
kmcolors()
plot(phsg$basis)
sp <- kmunionclosure(phsg$basis)
n <- kmneighbourhood(phsg$basis[3,], sp, include=TRUE)
plot(n, state=phsg$basis[3,])
m <- matrix(c(1,0,0,1,1,1,1,1,1), ncol=3, byrow=FALSE)
class(m) <- unique(c("kmsurmiserelation", class(m)))
plot(m, vertexshape="oval")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.