How to plot a graph along with axes graph?

3 ビュー (過去 30 日間)
Jhon Gray
Jhon Gray 2020 年 8 月 23 日
編集済み: dpb 2020 年 8 月 23 日
I want to creat a plot like this. is there any function for this? How to make it?

採用された回答

dpb
dpb 2020 年 8 月 23 日
編集済み: dpb 2020 年 8 月 23 日
Just build custom-placed subplot() axes...something like
I=imread('ngc6543a.jpg'); % just an image to use later...
figure
pos1=[0.1 0.3 0.2 0.6]; % guess at position vector for first axes
pos2=[pos1(1)+pos1(3)+0.05 pos1(2) 0.9-(pos1(1)+pos1(3))-0.05 pos1(4)]; % adjust for second
pos3=[pos2(1) 0.1 pos2(3) pos2(2)-0.15]; % and for third..
hAx(1)=subplot('Position',pos1); box on
hAx(2)=subplot('Position',pos2); box on
hAx(3)=subplot('Position',pos3); box on
hAx(1).YScale='log';
hAx(1).YLim=[0.10 35];
hAx(1).YTick=2.^[0:8]/8;
hAx(3).YLim=[-100 100]; hAx(3).XLim=[0 30];
image(hAx(2),I)
hAx(2).XTick=[];hAx(2).YTick=[];
resulted in
Hadn't yet added the colorbar and looks like could have made the width for hAx(1) somewhat smaller which will leave a little more room for it.
Basic form for what asked for, though, it would appear...
ADDENDUM:
NB: subplot is unneeded here; just use axes. I had initially tried to see if could smoosh together some but it only works to merge contiquous numbers, but then didn't change the call...

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by