When plotting a sparsity matrix using spy in MATLAB, the text nz=x, where x is an integer appears at the bottom. This number presumably refers to the number of nonzero elements in the matrix. How can one suppress this output from appearing in the final plot?
The nz= text that accompanies sparsity plots can be seen here:
This plot is from the MATLAB documentation on spy (the image URL is here).
I don’t know if there is a better way, but you can open the spy.m file:
and comment out the xlabel(([‘nz = ‘… line
You can even check the nargin, i.e., change your spy’s definition and check if you have for example a boolean or not to show nz accordingly…
Hope it helps