gpuguy
gpuguy

Reputation: 4585

How to put fine grid in plot

I have a function like this:

plot(f,Body, 'r', f,Walk, 'b', 'LineWidth' , 3);

I want to put fine grid in the plot. How do I do this.

Tried this

plot(f,Body, 'r', f,Walk, 'b', 'LineWidth' , 3);

 GridVisible = TRUE,
 SubgridVisible = TRUE;

but failed.

Upvotes: 4

Views: 14882

Answers (1)

bla
bla

Reputation: 26069

try to add after your plot line either

grid on

or ,

grid minor

To add labels get the positions of the minor grid ticks using the XMinorTick , YMinorTick properties, and add them as labels using the XTickLabel , YTickLabel properties. See more in Matlab documentation.

Upvotes: 3

Related Questions