0

I am using the plot function of to plot a graph. The code is as below -

plot([1; 2; 3; 4], [1; 2; 3; 4]);

The graph looks as below - enter image description here

As you can see, the plot is using a scale of 1.5 on both x and y axes. I want to change the scale to 1 on both axes. How can I do this?

Praneet Dixit
  • 1,393
  • 9
  • 25

1 Answers1

1

You can use the xticks and yticks commands to set the ticks to what you prefer. E.g.

xticks( 1:4 )
yticks( 1:4 )
Tasos Papastylianou
  • 21,371
  • 2
  • 28
  • 57