
How to plot a graph along with axes graph?
    5 次查看(过去 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 个)
另请参阅
类别
				在 Help Center 和 File Exchange 中查找有关 Discrete Data Plots 的更多信息
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


