MATLAB Answers

How to plot a graph along with axes graph?

조회 수: 2(최근 30일)
Jhon Gray
Jhon Gray 23 Aug 2020
편집: dpb 23 Aug 2020
I want to creat a plot like this. is there any function for this? How to make it?

  댓글 수: 0

댓글을 달려면 로그인하십시오.

채택된 답변

dpb 23 Aug 2020
편집: dpb 23 Aug 2020
Just build custom-placed subplot() axes...something like
I=imread('ngc6543a.jpg'); % just an image to use later...
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).YLim=[0.10 35];
hAx(3).YLim=[-100 100]; hAx(3).XLim=[0 30];
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...
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!

Translated by