1/24
Vocabulary flashcards covering essential MATLAB plotting commands, options, and example plot types from the lecture notes.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
plot()
MATLAB function for creating 2-D line graphs.
xlabel()
Adds a label to the x-axis of a plot.
ylabel()
Adds a label to the y-axis of a plot.
title()
Adds a title to the current axes.
grid on
Turns on a background grid to aid visual interpretation.
Line Styles
Patterns such as '-', '--', ':', and '-.' that control how lines are drawn.
Markers
Symbols like 'o', 's', '*', 'd' that mark individual data points on a plot.
hold on / hold off
Keeps current plot so additional data can be added / releases it.
legend()
Adds a descriptive label for each plotted data series.
bar()
Creates a bar chart for categorical or numerical data.
histogram()
Displays the distribution of data by grouping values into bins.
scatter()
Creates a scatter plot showing the relationship between two variables.
pie()
Generates a pie chart to show proportional data.
subplot()
Divides a figure window into a grid of sub-axes for multiple plots.
plot3()
Plots 3-D line data with x, y, and z coordinates.
meshgrid()
Generates 2-D grids for X and Y suitable for surface or mesh plots.
surf()
Creates a 3-D colored surface plot from X, Y, Z matrices.
shading interp
Interpolates colors across faces for smooth 3-D shading.
colorbar
Displays a color scale indicating data-to-color mapping.
saveas()
Saves the current figure to a file (e.g., PNG, PDF).
Sine Wave Example
Line plot of y = sin(x); demonstrates basic plotting and customization.
Bar Chart Example
Blue bars comparing categories A–D; illustrates categorical plotting.
Histogram Example
Magenta histogram with 20 bins of normally distributed random data.
Scatter Plot Example
Red filled dots sized at 100; visualizes two random 10-range variables.
3D Surface Plot
Plot of Z = sin(\sqrt{X^2+Y^2}) over a grid; shows shaded, colored surface.