问题
length of x = 1000, length of y = 1000
plot(x, y, '+');
xlabel ("p");
ylabel ("Q(p)");
title('Custom plot');
set(gca, 'xtick', [0.00000 0.20000 0.40000 0.60000 0.80000 1.00000])
This set command creates 6 tics in X axis, but I like to create 20 ticks so that there are 50 elements in between 2 tics.
Thanks in advance.
回答1:
From your comment I guess you don't know the concept behind Octaves "range". see here
In your case if you want the xticks go from 0 to 1000 and the difference between the steps is 20 just use:
set(gca, 'xtick', 0:20:1000);
来源:https://stackoverflow.com/questions/52675459/how-to-set-tics-in-x-or-y-axis-using-range-in-gnu-octave