First: if you’re a graph nerd like me, and you haven’t been reading The Prince of Slides blog, you need to go check it out now. You’ll notice that it’s been added to the link section on your right under ‘Friends of BCB’. Millsy has been on an absolute tear with his sab-R-metrics series — an introduction/primer to using R with baseball data such as PITCHf/x. I’m an Excel junkie, but I’ve been trying to learn R for the past few months and the sab-R-metrics posts are a godsend. Thanks, Millsy!
Second: heatmaps seem to be all the rage right now in PFX analysis. They’re interesting, and fun to look at. In fact, FanGraphs just announced that they are adding them to their site as a feature (read: Customizable Heatmaps!). However, being someone who likes to control the fine details of what they’re doing, I’m still very interested in generating my own heatmaps.
With the help from the sab-R-metrics series, I’ve been working in R to try and display Brian Wilson’s FB location by batter-handedness. As a sample, here’s a map of Wilson’s FB location versus left-handed betters from 2009 – 2010.
(Graph Note: remember, it’s based only on location and not any sort of run value. The greater the density of that pitch, in that area, the darker the heatmap is.)
It appears (and I assume it’s not that uncommon) that Brian Wilson pumps his heat away from left-handed batters. It seems like a good strategy for a pitcher that can run his fastball into the mid-to-upper 90s. As the saying goes, “Make them beat you the other way”. However, you’ll notice that my plot is slightly off-centered. That’s been my biggest issue with R. I’ve tried plotting without axes with similar results. I’ve also tried setting the axes parameters with ‘xlim’ and ‘ylim’ but the results were unfavorable. I probably don’t have enough data points, but I’d love to see if Wilson changes his approach when pitching in San Francisco. AT&T Park is notoriously tough on LHBs and I wouldn’t be surprised to see Wilson throw his heater down the pipe more at home.
Thoughts for another post, I guess. I’m still working out the problems with R, but if anyone that reads this site is an R user, I would love to hear any suggestions on how to fix my axes issues.
—-
UPDATE:
Not perfect, but probably the best I can do right now.
(Click to enlarge)
Thanks go out to Millsy at The Prince of Slides for his help. I couldn’t have done it without his excellent site.
Over the past two years, with the fastball, Wilson has worked left-handed batters away and pitched more to the heart of the plate against right-handed batters. There may have been some confusion in the comments section on how to read these graphs. The vantage point — like 99% of PFX graphs — is from the catcher’s POV. Just envision that you’re the catcher, sitting behind the plate, looking out towards the pitcher.



