When I use the command 'pcolor' on a large matrix I get a blank plot - does anyone know why?
71 views (last 30 days)
Show older comments
Jonathan Silas
on 5 Dec 2017
Commented: Walter Roberson
on 13 Mar 2022
When I use the command 'pcolor' on a large matrix I get a blank plot - does anyone know why?
I want to use 'pcolor' to plot a matrix of 6144 by 150 - if I just generate a matrix of this size using a random generator e.g.: X=rand(6144,150)
and then plot: pcolor(X)
I get a blank screen but pcolor works fine for e.g.: X=rand(25,10)
Please help. Thanks
0 Comments
Accepted Answer
Walter Roberson
on 5 Dec 2017
Is it blank, or is it black?
h = pcolor(X);
set(h, 'EdgeColor', 'none')
4 Comments
More Answers (1)
Jonathan Silas
on 5 Dec 2017
2 Comments
Margaret Zhang
on 13 Mar 2022
This was asked 5 years ago.... but just incase for anyone in the future lol. The set edgecolor essentially took out all of the borders of the graph so that you can see the colors. It looked black because the boxes of the matrix were so small that with a border on each block, it looked black.
Walter Roberson
on 13 Mar 2022
Or see my explanation from back then at https://www.mathworks.com/matlabcentral/answers/371168-when-i-use-the-command-pcolor-on-a-large-matrix-i-get-a-blank-plot-does-anyone-know-why#comment_512783
See Also
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!