Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specifying axis's step sizes in graph

I'm trying to plot a graph in Octave. How can I specify the axis's step size? For example, by default x axis's step size is 0.5(0---0.5---1---1.5---), I want to make it 0.1, and y axis's step size 0.01.

like image 260
Nazerke Avatar asked Dec 15 '22 12:12

Nazerke


1 Answers

This will change the step size on the x axis of an existing plot to 0.1:

xbounds = xlim()
set(gca, 'xtick', xbounds(1):0.1:xbounds(2))

You can do the same thing for the y axis using ylim and 'ytick'.

like image 58
Warren Weckesser Avatar answered Mar 05 '23 06:03

Warren Weckesser