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

3 Ansichten (letzte 30 Tage)
Sina Zinatlou
Sina Zinatlou am 17 Feb. 2021
Kommentiert: Sina Zinatlou am 17 Feb. 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

Antworten (1)

Image Analyst
Image Analyst am 17 Feb. 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 Kommentare
Sina Zinatlou
Sina Zinatlou am 17 Feb. 2021
fb = cwtfilterbank ( 'SignalLength',numel(b),'SamplingFrequency',Fs);
and b is a single row vector including n elements

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Wavelet Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by