😼Histogram by R base graph

  • Used to do a univariate analysis

Create a basic Histogram

# view data
data("iris")

# Create the histogram
hist(iris$Sepal.Width)

Output:

Change the label and color of a histogram:

hist(iris$Sepal.Width, xlab = "Sepal Width",
     main = "Distribution of Sepal Width", col = "darkgoldenrod")

Output:

Last updated