Drawing simple box plots
Box plots are simple, yet a very popular way to plot continuous versus discrete variables. Information covered by these plots usually account for median, first, and third quartile intervals, plus outliers. Among other visuals displayed here, it may be considered a simple one, once distribution format remains hidden. Sometimes less means more and simple means better.
If there is neither the need to highlight the distribution format nor investigate it, there is no reason to go further than box plot, otherwise you may send mixed signals to your audience. That would be like trying to hit a fly with a .50 bullet-you would probably miss it badly. This recipe teaches how to draw simple box plots using ggplot2
, ggvis
, and plotly
.Â
Getting ready
Previous recipe had car
package installed. If you did not run the previous recipe, you can simply run the following code:
> if( !require(car)){ install.packages('car')}
Now our data set will be available.
How to do it...
Here is how we...