Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to put fine grid in plot

Tags:

plot

matlab

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.

like image 637
gpuguy Avatar asked Sep 05 '25 00:09

gpuguy


1 Answers

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.

like image 118
bla Avatar answered Sep 07 '25 22:09

bla