Clear Filters
Clear Filters

Redraw semilogy without tick movement

2 views (last 30 days)
Daniel Saunders
Daniel Saunders on 8 Jun 2016
I have the following code drawing to a GUI
for i = 1:3000
[x, y] = getFFT(inlet, x);
axes(handles.spectrogram);
semilogy(w, y*.01);
axis([0 125 0 100]);
set(gca, 'YTick', [0 10 100], 'YTickLabel', {0 10 100})
xlabel('Frequency (Hz)');
ylabel('Amplitude (microvolts)');
set(gca, 'YTickLabel', {0 10 100});
hold on;
Each time this is plotted, I would like the Y-axis ticks to remain in the same position. Instead, they jump around a bit depending on the natural of the Fourier transform (y). Is there a way to get around this? Namely, I'd like the ticks not to move from their starting position.

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!