Responding to a comment (again from Ben!) on Day 11, I’ve used the more atomic plotting function of ggplot to break the data into another separate facet_grid – which definitely helps to illustrate (a little) the relationship between clarity and price on J colored diamonds:
– This may be less colorful, but it is a much more clear representation of the data at hand – we can see that as we progress from left to right, the apparent upward slope of price becomes steeper.
– It’s interesting that there is a real density change in the 2000-5000 price as we move from left to right – that’s where the lion’s share of column 2, 3 and 4 are, but in 5, 6 and 7 they narrow out. Maybe this is a cultural thing, re: pricing expectations for certain clarities?
> library(ggplot2) > jsmall <- subset(diamonds, color=="J" & carat <= 1.5) > j.facet <- ggplot(jsmall, aes(carat, price)) + geom_point() > j.facet + facet_grid(. ~ clarity)