How change the axes labels and axes range of each plot of one figure?

3 visualizaciones (últimos 30 días)
Sina Zinatlou
Sina Zinatlou el 17 de Feb. de 2021
Comentada: Sina Zinatlou el 17 de Feb. de 2021
Let's assume we have the automatically made figure like this, and we want to change every ax labels for both plots,
figure
timeSpectrum(fb,sm,'SpectrumType','density','Normalization','pdf'
when I am using xlable or Ylable just the second plot of the figure is going to change not the first Scalogram.
I can modify by figure property inspector but I want to do it to whole my coding
Thanks for helping

Respuestas (1)

Image Analyst
Image Analyst el 17 de Feb. de 2021
Try this (untested):
fontSize = 20;
subplot(1, 2, 1);
imshow(yourImage, 'Parent', h1);
title(h1, 'Magnitude Scalogram', 'FontSize', fontSize);
xlabel(h1, 'Time (hours)', 'FontSize', fontSize);
ylabel(h1, 'Period (hours)', 'FontSize', fontSize);
h1 = subplot(1, 2, 1);
imshow(yourImage, 'Parent', h1);
title(h1, 'Magnitude Scalogram', 'FontSize', fontSize);
xlabel('Time (hours)', 'FontSize', fontSize);
ylabel('Period (hours)', 'FontSize', fontSize);
h2 = subplot(1, 2, 2);
semilog(h2, x, y);
title(h2, 'Time Averaged Wavelet Spectrum', 'FontSize', fontSize);
xlabel(h2, 'Density', 'FontSize', fontSize);
ylabel(h2, 'Magnitude', 'FontSize', fontSize);
In general in most functions you can pass in the axis handle to that axes control to have the function operate on only that axes control.
  3 comentarios
Sina Zinatlou
Sina Zinatlou el 17 de Feb. de 2021
fb = cwtfilterbank ( 'SignalLength',numel(b),'SamplingFrequency',Fs);
and b is a single row vector including n elements

Iniciar sesión para comentar.

Categorías

Más información sobre Wavelet Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by