I have a bar chart question here. Given that for all the variables in the dataset 1 = yes and 0 = No. I would like to plot a bar graph with the percentages (where var=1) on the y-axis and the variables on the x axis. Thanks in advance.
Dataset
Water | Ice | Fire | Vapor |
---|---|---|---|
1 | 1 | 0 | 1 |
1 | 0 | 0 | 1 |
0 | 1 | 1 | 1 |
1 | 1 | 1 | 1 |
1 | 1 | 0 | 1 |
1 | 1 | 1 | 0 |
0 | 1 | 1 | 1 |
0 | 1 | 0 | 1 |
0 | 1 | 1 | 1 |
1 | 0 | 1 | 1 |
0 | 1 | 0 | 0 |
0 | 1 | 1 | 0 |
1 | 0 | 1 | 0 |
1 | 0 | 1 | 0 |
1 | 1 | 1 | 1 |
0 | 1 | 0 | 1 |
1 | 0 | 1 | 1 |
1 | 0 | 1 | 0 |
1 | 1 | 0 | 1 |
1 | 0 | 0 | 1 |
0 | 1 | 1 | 1 |
1 | 1 | 0 | 1 |
1 | 0 | 0 | 1 |
0 | 1 | 1 | 1 |