Blank figure when using spy to display a large matrix
Show older comments
I am trying to display a binary matrix of size 400 x 500 using the spy command. The steps I am using to do this are:
>> A = rand(400, 500); %Creates a random 400x500 matrix with each entry in [0,1]
>> A = round(A,0); % Replaces A with the result of rounding each entry to the nearest integer, producing a random matrix of zeros and ones
>> spy(A) % Creates a spy image of A in a plot window
When I copy the provided commands, my figure appears to be blank in the plot window. Testing the spy command with smaller matrices (for example a 3x3 matrix) it shows the image as expected. The issue appears to be related to the large size of the matrix I want to show, but I am not sure how to fix this issue. There is no error code, just a blank figure. I am using Matlab version 2022a.
Accepted Answer
More Answers (0)
Categories
Find more on Images 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!