Create clustered bar chart in R
Hello! I am looking to create a clustered bar chart in R with the following matrices (D1, D2 & D3):
D1 B1 B2 B3
A1 1 0 1
A2 1 0 1
A3 0.7154 0.2846 0.8341
A4 0.8396 0.1604 0.9128
A5 0.7038 0.2962 0.8261
A6 0.8551 0.1449 0.9219
D2 B1 B2 B3
A1 1 0 1
A2 0.9868 0.0132 0.9934
A3 0.6184 0.3816 0.7642
A4 0.8947 0.1053 0.9444
A5 0.8092 0.1908 0.8945
A6 0.8224 0.1776 0.9025
D3 B1 B2 B3
A1 1 0 1
A2 0.9961 0.0038 0.9981
A3 0.5478 0.4522 0.7079
A4 0.7513 0.2487 0.858
A5 0.6756 0.3244 0.8064
A6 0.863 0.137 0.9265
Such that I have one plot representing all the matrix points individually (no averaging). Any help is appreciated.
• 1,223 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Can you elaborate more on the plot you wish to produce? Is it correct that you want a bar plot with a numeric y-axis and a categorical axis with values like A1_B2 and a colour encoding for D1 - D3?
Yes. A bar plot with numerical y-axis and a categorical x-axis.