Could anyone help me to plot the graph.
    1 vue (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
    Prabha Kumaresan
 le 28 Mar 2018
  
    
    
    
    
    Commenté : Prabha Kumaresan
 le 28 Mar 2018
            I am using the following lines in my code to plot the graph. code:
xlim([0,25]);
set(gca,'XTick',[0:1:25]);
with respect to xaxis i need to have only 0,1,2,23 (only four numbers)
If i use the above lines in my code it is displayed as
0,1,2,3,...............25.
what should I do inorder to get only 0,1,2,23 in the graph.
0 commentaires
Réponse acceptée
  Walter Roberson
      
      
 le 28 Mar 2018
        set(gca, 'XTick', [0, 1, 2, 23]);
3 commentaires
  Walter Roberson
      
      
 le 28 Mar 2018
				The data you are plotting, are the x values for it only 0, 1, 2, and 23, and nothing else?
Is it necessary that the data cursor should show the 23 when it is over information in that range, or is it okay if the data cursor can be wrong?
... And you are still using R2015b, right?
Plus de réponses (0)
Voir également
Catégories
				En savoir plus sur 2-D and 3-D Plots 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!

