title: Sparse matrix plot matlab
body: <p>I have a 5000 *5000 sparse matrix with 4 different values. I want to visualise the nonzero elements with 4 different colors such that I can recognise the ratio of this values and the relationships between them,I use <strong>imagesc</strong> but I can not recognise very well among different values, especially the values with smaller ratio.I think if I use some symboles for each value , it works but I don't know how is it in Matlab. Any suggestion? The result of Dan code is in figure below.</p>
  
  <p><img src="https://i.stack.imgur.com/PCKl9.jpg" alt="results of about 5000*5000"><img src="https://i.stack.imgur.com/zJn8c.jpg" alt="result of 1000*1000 block of 5000*5000 matrix"></p>