Crafting proportional stacked bar
If you have to make a stand about proportions, proportional stacked bar graphs may be the way to go. Note that it works better when there are only few categories to analyze. If you have two continuous variables to display at both axes and still want to reinforce how proportions are changing among categories you shall call for proportional area plots instead.
Sticking with car::Salaries
data frame, this recipes is demonstrating how to craft proportional stacked bar graphs. Codes are covering plots made with ggplot2
, ggvis
and plotly
.
Getting ready
The only requirement that the recipes have the car
 , scales
, and plyr
 packages installed. Try running the following code to check for them and install if they not there:
> if( !require(car)){ install.packages('car')} > if( !require(plyr)){ install.packages('plyr')} > if( !require(scales)){ install.packages('scales')}
To install a missing package, internet connection is required.
How to do it...
Proportional stacked...