How do I change Grid Size in R2013a?
Show older comments
How do I change or adjust the grid size? I am suppose to have a grid of .001 for x values less than 2. How would I go about doing that? This is my code for my graph
x = (0:2*pi);
y = sin(x);
fig1 = plot(x,y)
grid on
xlabel('x-axis')
ylabel('y-axis')
3 Comments
Sasirekha
on 7 Oct 2023
Is the plot correct when the grid size is 5?
Sakthivel
on 18 Jun 2024
Is the plot correct when the grid size is 5?
Walter Roberson
on 18 Jun 2024
Yes, the plot is correct when the grid size is 5. It just isn't very interesting.
x = (0:2*pi);
uses the default increment of 1 for the list of values. The resulting x will have only 0, 1, 2, 3, 4, 5, and 6. That is not dense enough for a meaningful plot.
Accepted Answer
More Answers (0)
Categories
Find more on Graphics Object Properties in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!