How to draw 3D bar graph of Z for specified value of X and Y.
186 views (last 30 days)
Show older comments
Dear all, I want to plot a 3D bar graph for a given X, Y and Z row matrix. Actually I want to plot bar of Z for a specified coordinate of X and Y in X-Y plane. How to plot it please help me
Accepted Answer
Dimitris Kalogiros
on 21 Aug 2018
Edited: Dimitris Kalogiros
on 21 Aug 2018
I thing you should use stem3 command.
Have a look at the following example:
clear; close all; clc;
x = 0:1:10;
y = exp(2:-0.2:0);
z=sqrt(x)+2*((y.^2).^(1/3));
stem3(x,y,z, '-b','LineWidth',4);
xlabel('x'); ylabel('y'); zlabel('z');
zoom on; grid on;
stem3() produced "bar like" 3D graphs

More Answers (1)
See Also
Categories
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!