Praneet Dixit
Praneet Dixit

Reputation: 1425

Change scale of axes in octave plot

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?

Upvotes: 0

Views: 966

Answers (1)

Tasos Papastylianou
Tasos Papastylianou

Reputation: 22225

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

xticks( 1:4 )
yticks( 1:4 )

Upvotes: 1

Related Questions