Imagesc - set diag to white
    2 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
Hi, Is there anyway to force a particular color on the diagonal of matrix plotted using imagesc?
Thanks, S
0 Commenti
Risposte (1)
  Walter Roberson
      
      
 il 7 Nov 2011
        You would have to record the handle of the image object returned by imagesc(), get() the CData property from that handle, set the diagonal of that color data to be equal valued (e.g., all 1) on all three color planes, and set() the CData back to the modified matrix.
This will not work for pseudocolor images, though; right at the moment I do not have access to MATLAB to test whether imagesc() creates truecolor or pseudocolor CData . If it does create pseudocolor, then it becomes more complex, especially if white is not one of the colors in the color map.
0 Commenti
Vedere anche
Categorie
				Scopri di più su Operating on Diagonal Matrices in Help Center e File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

