Mirror bar chart: 2 bar charts, 2 y axes, 1 x axis. Is it possible?
Mostrar comentarios más antiguos
Hi all!
I want to get this mirror bar chart. Tried everything but nothing works.
Any idea?

6 comentarios
VBBV
el 2 de Oct. de 2020
For the lower figure do
% if true
% code
% end
h= axes
bar(...)
set(h,'Ydir','reverse');
Jose Rego Terol
el 2 de Oct. de 2020
Editada: Jose Rego Terol
el 2 de Oct. de 2020
Jose Rego Terol
el 2 de Oct. de 2020
Jose Rego Terol
el 2 de Oct. de 2020
VBBV
el 2 de Oct. de 2020
%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])
Jose Rego Terol
el 3 de Oct. de 2020
Editada: Jose Rego Terol
el 3 de Oct. de 2020
Respuestas (1)
Jose Rego Terol
el 2 de Oct. de 2020
Categorías
Más información sobre Graphics Object Properties en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


