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

4 ビュー (過去 30 日間)
Sina Zinatlou
Sina Zinatlou 2021 年 2 月 17 日
コメント済み: Sina Zinatlou 2021 年 2 月 17 日
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 件のコメント
Image Analyst
Image Analyst 2021 年 2 月 17 日
You forgot to attach fb and b.
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 Center および File ExchangeWavelet Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by