Plotting a matrix with wireframe where one axis isn't 1:max

I’m plotting a matrix in which the interpretation of one axis isn’t the 1:n where n is size of the axis.

For example:

using Plots

data = reshape(rand(9), 3,3)
p = wireframe(data)  # works fine with both axis 1:3
xticks!(p, 11:13) # the axis disappears

How can I get the xaxis to show 11,12,13 instead of 1,2,3?

p = wireframe(data; xticks=(1:3, 11:13))
1 Like

And also, instead of reshaping a 9 rand vector, you can just do rand(3,3).

Providing the axes to start with is the easiest way:

wireframe(11:13, 1:3, data)

Thanks, all! Still learning.