3d BAR GRAPH WITH ERROR
1 次查看(过去 30 天)
显示 更早的评论
Hi,
I am trying to plot 3D bar graph with x_true , y_true coordinates and error percentage. I tried stem, meshgrid, bar3 etc, but not able to do so. can anyone assist me to plot the graph?
figure
x_pred = Net_Out(1,:);
y_pred = Net_Out(2,:);
%
x_true = correct_output(:,1);
y_true = correct_output(:,2);
err = sqrt((x_pred - x_true).^2 + (y_pred - y_true).^2);
figure
meshgrid(x_true, y_true, err);
% figure
% percent_er = 100*errorbar((x_pred - x_true),(y_pred - y_true),err);
% figure
% bar3(err)
0 个评论
回答(1 个)
Drishan Poovaya
2021-11-1
I understand you want to create 3D plot of the errors vs x_true and y_true.
First of all, based on the code you have provided, the dimensions of x_pred and y_pred do not match those of x_true and y_true.
You can try evaluating x_pred and y_pred as below
x_pred = (Net_Out(1,:))';
y_pred = (Net_Out(2,:))';
For this kind of plot, using stem3 would provide the kind of plot you are expecting
stem3(x_true, y_true, err);
Documentation :
5 个评论
Drishan Poovaya
2021-11-12
It requires a bit of a workaround, but the answer below does what you are asking for
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!