I am looking for a way to plot a matrix of type character:
m=matrix(data=c("A","A","B","B","B","C","C","B"),nrow=4,ncol=2)
> m
[,1] [,2]
[1,] "A" "B"
[2,] "A" "C"
[3,] "B" "C"
[4,] "B" "B"
with a defined set of colours
A="Yellow"
B="Blue"
C="Green"
Should I pass from matrix to ascii and use image() from sp package?
I am looking fro something like this:

It rather depends on what you meant by “plot a matrix”:
This plots solid diamonds of the specified color at the matrix locations determined by the row and columns of matrix m. Another way with
image: