Create a MATLAB Plot Interactively - MATLAB
Video Player is loading.
Current Time 0:00
Duration 1:56
Loaded: 8.47%
Stream Type LIVE
Remaining Time 1:56
 
1x
  • Chapters
  • descriptions off, selected
  • en (Main), selected
    Video length is 1:56

    Create a MATLAB Plot Interactively

    Learn how to create MATLAB plots interactively. If you know exactly how you want to visualize your data, simply select/highlight it in the workspace and MATLAB will display all relevant chart types for your data.

    For a guided experience, use the Create Plot Live Editor task in the MATLAB Live Editor to browse all chart types or create a specific chart. For each type of graph, the Live Editor task shows the arguments needed to create the graph, which you can select from your workspace. The generated graph updates as you make tweaks and change parameters.

    You can customize a visualization even further by popping out the figure window and accessing various tools like the Figure Palette and Property Editor.

    When you are done with your customizations, you can generate the code needed to reproduce them and easily apply the visualization to other data.

    Published: 1 Sep 2021

    MATLAB makes it easy to create useful plots from your data. Find the Plots tab and note that the visualization options adjust depending on your selected data, whether from the Workspace, a subset of your data, or full table columns.

    If you prefer more guidance on creating your plot, use the Live Task for an easy, interactive experience.

    If you know exactly what kind of plot you need, start typing it into the Live Editor. This last entry opens the Live Task and pre-populates with relevant plot types. Simply select your data and note again that the interface changes dynamically based on the format of your data and the plot type.

    If you're just starting to explore your data, find the Live Task from the menu and select your data as the first step. You'll notice the two-way filtering, where your visualization choices adjust depending on your data, and vice versa. You can also filter visualizations by category to narrow down which ones would be most meaningful to you.

    When you've created your plot, don't forget to give it a meaningful title and other labels, and click Update Code to reflect the changes. When you're done, you can find all the code needed to reproduce and share your results.

    For even more plot customizations, pop out the Figure window and try out tools like the Figure Palette and Property Editor. You can use them to create subplots, quickly add basic line graphs, or right click for custom plots, and add annotations.

    Select any part of your plot to edit features and properties.

    When you're done make sure to generate the code, which creates a function that can be used to reproduce your results and apply on other data.

    MATLAB makes it easy to create a plot quickly, and provides guidance with a Create Plot Live Task. Keep these in mind for the next time you need to visualize your data.

    Related Products

    View more related videos