

Thus, we see how the number of arrests for assault is higher in the South and West zones, while the number of arrests for rape is higher in the West zone states. This joint graph with the behavior of the states according to each of the four regions of the country presents the information to the reader in a visually effective way, not only showing the change in arrest ratios from region to region but also contrasting the differences according to the nature of the crime. Also, Figure 17 shows that there is a constant and continuous trend of the different types of crimes in all regions. Furthermore, the variability in the number of arrests produced by assaults is greater than in the other two types of arrests, where they are more stable. Generally, it can be seen that the number of arrests for assaults (around 159) is much higher than the number of arrests for rape and murder, as well as the number of arrests for rape (on average around 20.1) is higher than those for murder (around 7.25 Figure 8). The data shown in Figure 8 and 17 present a summary of the arrest rate for murder, rape, and assault (per 100,000 residents) in the 1970s in the United States. Group labels which will be printed under each boxplotĬustomize the color of the filling and the border of the box, as well as its shape, modifying the col, border, and notch arguments ( Figure 2): Set as TRUE to draw width of the box proportionate to the sample size Vector of colors with which it is painted Table 1 Some of the Most Useful Arguments for Modifying Graphical Parameters in Boxplot Function The reader can review all available graphical arguments in the program help using the command: ?boxplot.

Some of the most useful arguments are shown in Table 1. The boxplot representation of R can be more attractive by modifying the graphical parameters of this type of function. Improvement of the Graph Appearance of the Boxplot Chart The program allows us to improve its appearance using the plot function arguments. These three datasets provide the state divisions the state regions that each state belongs to population estimate, per capita income, illiteracy, life expectancy in years, murder, and nonnegligent manslaughter rate per 100,000 population, percent high-school graduates, mean number of days with minimum temperature below freezing in capital or large city.įigure 1. To show the usefulness of the boxplot when one or several qualitative variables are available, this base was merged with state.division, state.region, and state.x77 also available in the R-package. The variables provided are murder, assault, and rape arrests (per 100,000) and the percent of the urban population.
#How to make a box and whisker plot free#
This is a database available in R-package and is free of charge. This dataset contains statistics, in arrests per 100,000 residents for assault, murder, and rape in each of the 50 U.S.

The dataset used in this tutorial is the USArrests data. An Example in RStudio: Violent Crimes Arrests Per 100,000 Residents in U.S.
