Let us say we have the following:
planet <- c("Earth", "Mars", "Jupiter", "Venus")
trips <- 1:20
pilot <- 1:4
data <- data.frame(Planet = sample(planet, 20, replace=T),
Pilot = sample(pilot, 20, replace=T),
Trips = sample(trips, 20, replace=T))
How do I create a bar plot in which the Y axis is the number of trips, and the X axis is the pilot number, but for each X value/interval we have not one bar but four(one for each planet)?