MATLAB Answers

Mirror bar chart: 2 bar charts, 2 y axes, 1 x axis. Is it possible?

13 views (last 30 days)
Jose Rego Terol
Jose Rego Terol on 2 Oct 2020
Edited: Jose Rego Terol on 3 Oct 2020
Hi all!
I want to get this mirror bar chart. Tried everything but nothing works.
Any idea?
  6 Comments

Sign in to comment.

Answers (1)

Jose Rego Terol
Jose Rego Terol on 2 Oct 2020
Nearly done
figure
ax1 = axes('Position',[0.138095238095238 0.529474812433012 0.791904761904761 0.400525187566988]);
bar(ax1,a,c)
box off
ax2 = axes('Position',[0.138095238095238 0.142857142857143 0.791904761904763 0.386617669575869]);
bar(ax2,a,b)
box off
set (ax2, 'ydir', 'reverse')

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!