Damian Lillard’s Game-Winner in Context
Damian Lillard of the Portland Trailblazers hit a crazy game-winner the other night. The game was tied, the clock was winding down, and Lillard pulled up from a thousand feet away for the win. Lillard’s straight-faced reaction was as good as the shot.
Here’s how that shot matches up with all of the other threes Lillard has made during his playoff career:
The R code, in case you’re interested:
library(png) library(plotrix) # Load data. makes3 <- read.csv("https://flowingdata.com/projects/2019/lillard/threes_lillard.tsv", sep="\t") # Plot all made threes par(mar=c(0,0,0,0)) plot(-makes3$loc_x[-dim(makes3)], makes3$loc_y[-dim(makes3)], cex=.7, pch=19, col="#888888", asp=1, bty="n", axes=FALSE, xlab="", ylab="", xlim=c(-25, 25), ylim=c(0, 50)) segments(-makes3$loc_x[-dim(makes3)], makes3$loc_y[-dim(makes3)], rep(0, dim(makes3)), rep(5.25, dim(makes3)), lwd=.4, col="#888888") draw.arc(0, 5.25, 9/12, angle1=0, angle2=2*pi, col="black", lwd=2) # Game winner x_win <- -makes3$loc_x[dim(makes3)] y_win <- makes3$loc_y[dim(makes3)] segments(x_win, y_win, 0, 5.25, lwd=3, col="#CF082C") # Note: Download file at https://flowingdata.com/projects/2019/lillard/lillard_face.png img <- readPNG("lillard_face.png") rasterImage(img, xleft=x_win-2, xright=x_win+2, ybottom = y_win-2, ytop=y_win+2) symbols(x_win, y_win, squares = 4, add=TRUE, inches=FALSE, lwd=3, fg="#CF082C") text(x_win+2.25, y_win, "Bye, OKC.", pos=4, family="Georgia", font=3, cex=.9)
Learn to Visualize Data See All →
How to Make a Contour Map
Filled contour plots are useful for looking at density across two dimensions and are often used to visualize geographic data. It’s straightforward to make them in R — once you get your data in the right format, that is.
An Easy Way to Make a Treemap
If your data is a hierarchy, a treemap is a good way to show all the values at once and keep the structure in the visual. This is a quick way to make a treemap in R.
How to Make Better-Looking, More Readable Charts in R
Defaults are generalized settings to work with many datasets. This is fine for analysis, but data graphics for presentation benefit from context-specific design.