How to add a subfigure on top of an other figure?
2 views (last 30 days)
Show older comments
I would like to add a subfigure on top of another figure, like a legend. For example like this: http://www.mdpi.com/sensors/sensors-12-03578/article_deploy/html/images/sensors-12-03578f3-1024.png
0 Comments
Answers (1)
Sean de Wolski
on 28 May 2015
Add another axes with the axes() command.
1 Comment
Joseph Cheng
on 28 May 2015
so you'll then modify the new axes with the position parameter like:
figure(1)
mainAX = plot(magic(3).*randi(10,3,3));
subAX = axes('position',[.4 .7 .2 .2]);
xlabel('Voltage')
ylabel('current')
See Also
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!