Mirror bar chart: 2 bar charts, 2 y axes, 1 x axis. Is it possible?
2 次查看(过去 30 天)
显示 更早的评论
Hi all!
I want to get this mirror bar chart. Tried everything but nothing works.
Any idea?
6 个评论
VBBV
2020-10-2
%if true
% code
% end
a = (1:10)';
b = rand(10, 1);
c = rand(10, 1)*0.75;
figure
h1 = axes
bar(a,b);set(h1,'Ydir','normal'); hold(h1,'on')
h2 = gca
bar(a,-c)
set(h2, 'Ydir', 'reverse')
axis([0 10 -1 1])
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!