how to adjust distance between icon legend to its label?
    4 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
Hi, I want to decrease the distance between legend icon to its label. If somebody knows, please help. Thank you
0 commentaires
Réponses (1)
  Priyank Sharma
      
 le 25 Avr 2018
        You can find the children of Legend object. You can search for the ones that have their Type set to text and relocate them. Below is a sample code to show how to do that. It moves them to left by 0.5 units relative to the legend box. Here 'legend' is your Legend object.
ch = get(legend, 'Children');
textCh = ch(strcmp(get(ch, 'Type'), 'text'));
for i = 1:numel(textCh)
    set(textCh(i), 'Position', get(textCh(i), 'Position') + [-0.5 0 0])
end
Voir également
Catégories
				En savoir plus sur Legend dans Help Center et File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

