Adding subplots to secondary axis
Show older comments
Is it possible to add subplots to a secondary axis in a figure?
x1 = 1:5;
x2 = 5:10;
x3 = 10:15;
y1 = exp(x1);
y2 = exp(x2);
y3 = exp(x3);
descr = {'Basic text'
};
fig = figure('Name','','units','normalized','pos',[0 0 1 1]);
ax1 = axes('Position',[0.1 .5 0.5 0.5],'Visible','off'); % axis for the text
text(.025,0.6,descr)
ax2 = axes('Position',[.3 .1 .6 .8]); % axis for the big plot
plot(x1,y1)
ax3 = axes('Position',[0 0 0.26 0.5]); % axis for the subplots
subplot(2,1,1)
plot(x2,y2)
subplot(2,1,2)
plot(x3,y3)
Now it just overwrites every command before the subplot line. What am I doing wrong or is this even possible?
Accepted Answer
More Answers (0)
Categories
Find more on Subplots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!