How do I make a pcolor plot use the first row and column of the data for the X and Y axes?
Show older comments
I need to do an interactive image plot of data that are in matrix form. The first row and column are the X and Y values, the rest of the matrix represents the corresponding Z values. A pcolor plot plots all the data in the matrix. How do I make it use the first row and column for the X and Y axes?
Accepted Answer
More Answers (1)
Image Analyst
on 30 Dec 2013
This is false: "A pcolor plot plots all the data in the matrix." Just try it
myMatrix = magic(4); % Make 4x4 array
pcolor(myMatrix); % Displays 3x3 image.
If I were you I'd use imshow() instead, or image() or imagesc().
1 Comment
Chad Greene
on 1 May 2015
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!