Black Lives Matter. Please consider donating to Black Girls Code today.

Stem Plot in MATLAB®

How to make stem plots in MATLAB®.


fig = figure;
X = linspace(0,2*pi,50)';
Y = [cos(X), 0.5*sin(X)];
stem(X,Y)
 
% Plotly!
fig2plotly(fig, 'strip', false, 'filename', 'ADD_YOUR_FILENAME');

MATLAB is a registered trademark of The MathWorks, Inc.