How to add minor ticks to a graph from the command lines?

Illustration
Evasmith95 - 2020-08-28T11:14:55+00:00
Question: How to add minor ticks to a graph from the command lines?

I want to to add the Minor Ticks from the command line. Currently, I'm editing the Major Ticks as follows: set(gca) set(gca,'XTick',0:1:7) set(gca,'YTick',-1:0.5:1) but I did not find any documentation for the minor ticks. I hope to find someone familiar with this subject.

Expert Answer

Profile picture of Prashant Kumar Prashant Kumar answered . 2025-11-20

Is this what you want?

 

set(gca,'XMinorTick','on')


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!