bar chart 2 data sets side by side with different axis
Ältere Kommentare anzeigen
hold on;
yyaxis left
bar(T3_blocked)
yyaxis right
bar(S1_free)
set(gca, 'XTickLabel',name)
set(gca, 'XTick',1:length(name))
set(gca, 'XTickLabelRotation',45)
hold off;
produces:

how can I have the two bars for each material side by side, so the y-axes are both increasing in the same direction (up)?
Akzeptierte Antwort
Weitere Antworten (1)
Image Analyst
am 29 Jan. 2022
How about taking the absolute value of S1_free?
bar(abs(S1_free));
1 Kommentar
cdlapoin
am 29 Jan. 2022
Kategorien
Mehr zu Bar Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
