I think the problem in your first example is that z is a vector and not a matrix. And in the second one z is a matrix which is good, but your color array has size (124, 124) while your x and y vectors have length 30.
1 Like