Plot or mark a single point in App Designer
    4 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
    Ermanno Manca
 le 10 Juil 2020
  
    
    
    
    
    Modifié(e) : Ermanno Manca
 le 11 Juil 2020
            Hey, i know how to plot lines and functions etc. and am struggling on a real simple step.
I'd like to mark or plot a single point like "y=0 x =100" in a certain color.
It would be even great to write a short Text over or under this point like (X_CP). 
Hope someone can solve this Problem.
Have a nice day and best regards,
Ermanno 
0 commentaires
Réponse acceptée
  Cris LaPierre
    
      
 le 10 Juil 2020
        You have to add a second plot to your figure using hold on, and plot just the single point with your desired color and line style.
Using the x,y coordinates of that point, you can use the text function to add a custom label for that point to your figure.
5 commentaires
  Cris LaPierre
    
      
 le 10 Juil 2020
				x = 0:pi/100:2*pi;
y = sin(x);
plot(x,y)
hold on
plot(1.5,0,'rs')
hold off
text(1.5,0.1,"x_CG","Interpreter", "none")

Plus de réponses (0)
Voir également
Catégories
				En savoir plus sur Annotations 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!

