Create Plot
Description
The Create Plot task lets you interactively create and explore visualizations for your data. Choose visualizations from a list of categories or let the task recommend them based on your workspace variables. The task automatically generates MATLAB® code and adds labels to the generated visualization.
Using this task, you can:
Create a plot by selecting variables and a chart type.
Explore different visualizations of the same data. Select some variables first, then try selecting different chart types.
Explore different data in the same visualization format. Select the chart type first. The task will prompt you for data.
Combine multiple plots. Overlay or combine multiple visualizations by clicking on the Add tab.
Customize the appearance of your plot. For example, you can change the marker symbol for line charts and the arrangement of bars for bar charts.
The Create Plot task supports most MATLAB plots, including line plots, scatter plots, and histograms. For a list of plots and functions to generate them programmatically, see Types of MATLAB Plots.
This task also supports some charts from Signal Processing Toolbox™ and Control System Toolbox™. For more information about creating linear analysis plots with dynamic system models, see Create Plot (Control System Toolbox).
Open the Task
To add the Create Plot task to a live script in the MATLAB Editor:
On the Live Editor tab, select Task > Create Plot.
In a code block in the script, type a relevant keyword, such as such as
viz
,visualize
,create
, orhold
. Select Create Plot from the suggested command completions.In a code block in the script, type the name of a charting function, such as
plot
,bar
, orcontour
. Select Create Plot from the suggested command completions. When you add the task using this method, then MATLAB automatically selects the corresponding chart type in the Select visualization section of the task.
Tips
To interactively customize the text of titles, labels, and legends, use the options in the Figure tab.