how can i import two windrose figure into the same figure

2 ビュー (過去 30 日間)
Zen der Tasi
Zen der Tasi 2020 年 5 月 14 日
コメント済み: Zen der Tasi 2020 年 5 月 14 日
I have two wind rose figure,that had been saved as figure document.
I try to open the wind rose figure and import them into the same figure.
but it dosen't work
this is my code
close all
fig=struct();
for items_b=1:length(data_name)
fig(items_b).x1=openfig([aim,'\',strrep('ty stationw','w',data_name(items_b)),figure_type]);
fig(items_b).ax1=gca;
fig3 = figure;
fig(items_b).s1 = subplot(4,2,items_b);
fig(items_b).fig1 = get(gca,'children');
copyobj(fig(items_b).fig1,fig(items_b).s1);
fig(items_b).x2=openfig([aim,'\',strrep('noty stationw','w',data_name(items_b)),figure_type]);
fig(items_b).ax2=gca;
fig4= figure;
fig(items_b).s2 = subplot(4,2,items_b);
fig(items_b).fig2 = get(gca,'children');
copyobj(fig(items_b).fig2,fig(items_b).s2);
end
  3 件のコメント
Robert U
Robert U 2020 年 5 月 14 日
Hi Zen der Tasi,
Please, tell us what function you used to generate your wind rose figures or attach two examples. Using wind_rose() from File Exchange produces windroses made of patches that do not bear information about scaling. Copying the axes children to one new figure works but scaling is not correct (i.e. colors do not match the magnitudes).
Kind regards,
Robert
Zen der Tasi
Zen der Tasi 2020 年 5 月 14 日
may propose is
to make 16 windrose figure saperated into two figure
in other word each figure have 8 windrose figure inside
the windrose function i use is by this

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2020 年 5 月 14 日
fig=struct();
fig3 = figure;
fig4 = figure;
for items_b=1:length(data_name)
fig(items_b).x1 = openfig([aim,'\',strrep('ty stationw','w',data_name(items_b)),figure_type]);
fig(items_b).ax1 = fig(items_b).x1.CurrentAxes;
fig(items_b).s1 = subplot(4, 2, items_b, 'Parent', fig3);
fig(items_b).fig1 = fig(items_b).ax1.Children;
copyobj(fig(items_b).fig1, fig(items_b).s1);
fig(items_b).x2 = openfig([aim,'\',strrep('noty stationw','w',data_name(items_b)),figure_type]);
fig(items_b).ax2 = fig(items_b).x2.CurrentAxes;
fig(items_b).s2 = subplot(4, 2, items_b, 'Parent', fig4);
fig(items_b).fig2 = fig(items_b).ax2.Children;
copyobj(fig(items_b).fig2, fig(items_b).s2);
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by