I want to set the axes XTicks to evenly-spaced, non-monotonically increasing axes vectors. When I execute
x = linspace(-pi,pi-2*pi/100,100); y = sin(3*x)./(3*x); plot(x*180/pi,y); axis tight myTicks = get(gca, 'xtick'); myTicks(myTicks<0) = myTicks(myTicks<0) + 360; set(gca, 'xtick', myTicks)
I obtain the result
??? Error using ==> set Values must be monotonically increasing.
I want to be able to set the XTicks vector to a non-monotonic axis vector so that when I use GINPUT to read the pointer coordinates I do not need to keep track of the differences between the actual XTicks and the value that I want them to represent.
Best Answer