MATLAB: I want to plot some thing like this picture how can i do this figurenested plotplot inside another plot Please see attachment below… Best Answer Use AXES to create a new axis relative to the another axesx = 0:100 ; y = exp((x/50).^2)+rand(size(x)) ; % some data% plot #1ph = plot(x,y,'b-')hold on fill(x([1 1 50 50]),y(1) + [1 -1 -1 1],[1 1 0]) hold off ;uistack(ph,'top') % insert plotp0 = get(gca,'position')p1 = [p0(1)+0.1 p0(2)+0.3 p0(3)/2 p0(4)/2]axes('Position',p1)plot(x(1:50),y(1:50),'b-') Related SolutionsMATLAB: How change x axis data set to another on plot axes if you have axes to the handle it is easy:x = rand(10,1) ;y = rand(size(x)) ;ph = plot(x,y,'bo-') ; % ph is the graphics handle to the line objecttitle ('Hit Ctrl-C to break') ;while 1 set(ph,'xdata', rand(size(x))) ; pauseendYou can get the handle using the children property of the axes. MATLAB: Way to plot multiple lines in 3d specifying start and end point P0 = rand(7,3) ;P1 = rand(7,3) ;X = [P0(:,1) P1(:,1)] ;Y = [P0(:,2) P1(:,2)] ;Z = [P0(:,3) P1(:,3)] ;plot3(X',Y',Z')hold onplot3(X',Y',Z','.') Related QuestionHow to expand x axis to have normal plotHello, I am developing one GUI in which, I want to plot 4 graphs on the same axes. Can anyone suggest me to get solution on this problem? Thanks…!How to plot with pcolor one 2D function with two x axisHow to plot multiple figures in the same figure in matlab?
Best Answer