how to add a STAR or Triangle shape to plot simply without knowing their vertex?
    156 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
Hi
I have a contourf. I'd like to just add a simple Star or Triangular shape to certian location within the plot. I am thinking to use Patch() but patch still requires to provide the vertext of this Star or triangular shape in order to draw it.  Is there a command to add this shape without knowing their vertex? Thanks
0 Commenti
Risposta accettata
  Jonas
      
 il 15 Lug 2021
        
      Modificato: Jonas
      
 il 15 Lug 2021
  
      smth. like that probably
Z = peaks;
contourf(Z); hold on; 
plot(15,10,'rp','MarkerSize',15,'MarkerFaceColor','r')
3 Commenti
  Jonas
      
 il 16 Lug 2021
				hi roudan, you can show your code how you saved your handles. the following worked for me without problems:
Z = peaks;
contourf(Z); hold on; 
mark=plot(15,10,'rp','MarkerSize',15,'MarkerFaceColor','r');
delete(mark)
Più risposte (0)
Vedere anche
Categorie
				Scopri di più su Annotations 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!

