How to plot a graph along with axes graph?
조회 수: 3 (최근 30일)
이전 댓글 표시
채택된 답변
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
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!