Matlab GUI With Multiple Axes

We can create Matlab with multiple axes with command subplot.  Example :

Output image from this Matlab with multiple axes code is :

But when we create a gui program (with GUIDE) in matlab, we can not create Matlab GUI with multiple axes directly. This is a trick how to create plot Matlab GUI with multiple axes.

  • Open matlab gui figure and add panel.
  • Add axes in top of panel.
  • This is a Matlab GUI with Multiple axes design

Add this script to you m-file from this GUI generated :

So, ouput from this Matlab GUI with multiple axes :

You can download the complete code for this Matlab GUI with multiple axis from this tutorial at here.

3 thoughts on “Matlab GUI With Multiple Axes

  1. Hello,

    Thanks for the trick.
    I am trying to define xlabel and xlim to the subplots, but it keeps on opening new figure for it.
    My plot is also in a timer function, but I don’t think it’s the problem.
    Do you have any idea how to solve it?

    Thank you,

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.