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

3 次查看(过去 30 天)
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

回答(1 个)

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

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Wavelet Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by