Description Usage Arguments Value Examples
This is a function that can produce a Czekanowski’s Diagram.
1 2 3 4 5 |
x |
a matrix with class czek_matrix. |
values |
specifies the color or the size of the symbols in the graph. The standard setting is a grey scale for a color graph and a vector with the values 2,1,0.5,0.25 and 0 for a graph with symbols. |
type |
specifies if the graph should use color or symbols. The standard setting is symbols. |
plot_pch |
specifies which symbols the graph should use. The standard setting is 19, which is a black circle. |
plot_cex |
specifies the size of the cells in a color graph. The standard setting is 1.5. |
label.cex |
specifies the size of the labels for the objects. The standard setting is 0.6. |
plot_title |
specifies the main title in the graph. |
legend |
specifies if a legend should be included or not. The standard setting is that the legend will not be included. |
axis |
specifies if the labels for the objects should be included. The standard setting is that the labels are included. |
... |
specifies further parameters that can be passed on to the seriate function in the seriation package. |
The function returns a Czekanowski’s Diagram.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | # Set data ####
x<-czek_matrix(mtcars)
# Standard plot ############
plot(x)
plot.czek_matrix(x)
# Specify values ############
plot(x,values=c(1.5,1,0.75,0.25,0 ))
plot(x,values=grDevices::colorRampPalette(c("black","red","white"))(5))
# Specify type ############
plot(x,type = "symbols")
plot(x,type = "col")
# Specify plot_pch ############
plot(x,plot_pch = 15)
# Specify plot_cex ############
plot(x,type="col",plot_cex = 1)
# Specify plot_cex ############
plot(x,label.cex = 0.45)
# Specify the main title ############
plot(x,plot_title = "Czekanowski’s Diagram of mtcars")
# Add legend ############
plot(x,legend = TRUE)
# Remove axis name ############
plot(x,axis = FALSE)
# Change additinal settings to the plot function ############
plot(x,col.main="blue",font.main=9,cex.main=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.