0

I want to create an image plot for a matrix. And I used the following code,

image.plot(X)

My X is an n by n square matrix. And it is the

graph

I am wondering how can I change X value into a vector of characters since each row and column in the matrix refers to an object. For example, can I change the x value 0, 0.2, 0.4,...to "apple","pear","peach",etc? I tried the following which didn't work

image.plot(X,xaxt = "n")
axis(1, at=seq(1, 36, by=1), labels =j)

where j is the label I want.

Terry
  • 179
  • 3
  • 9

0 Answers0