pcolor gridding, grid not match
1 view (last 30 days)
Show older comments
Hi. I have a 15 X 15 matrix, and each value in the matrix represents a specific gridblock value. For example if AmountOfRock(1,1) = 300, then gridblock(1,1) with an area of A X A meters in real life have 300 rocks in it, and so on. The problem is, when I use
pcolor(AmountOfRock)
there are only 14 gridblocks, with 15 grid intersections in both X and Y axis. Apparently, pcolor creates a plot in which it assigns each value in AmountOfRocks to grid intersections, not to gridblock. Is there any way to make pcolor assign each value in a matrix to its respective gridblock location and NOT to grid intersection?
0 Comments
Answers (2)
Walter Roberson
on 12 Mar 2013
No, there is not. Use image() or imagesc() instead of pcolor().
1 Comment
Image Analyst
on 12 Mar 2013
Common problem. Unfortunately way too common. It should really be explained better or made more obvious in the help. Actually I wonder how so many people, to their detriment, stumble upon pcolor(). I would think they would have encountered image(), imshow(), or imagesc() before pcolor() in their search for a method to display images.
Ilham
on 12 Mar 2013
Edited: Ilham
on 12 Mar 2013
1 Comment
Walter Roberson
on 12 Mar 2013
Creating an empty gridblock will not solve the problem that your points are going to be interpolated.
What result did you get with imagesc() that was different from what you hoped for?
See Also
Categories
Find more on Graphics Performance 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!