Article written by

9 comments
elliotjorgensen
elliotjorgensen

My favorite spots on the heat map are to the positive side (greater than 1) and up high (around 5). A 98 mph fastball at a batter's chin can really open up the outside corner for the following pitch. And I do agree that Wilson is more likely to pitch inside at home, with death valley, than on the road. Especially when compared to a place like Enron statdium (hah! Enron).

Ben M
Ben M

Okay, this must be a stupid question since nobody else has mentioned it, but doesn't the heat map show that he throws inside to lefties? Or is it taken from the batter's point of view?

Chris Quick
Chris Quick

Sorry, I should be more clear: graph is from the catcher's POV -- ie: sitting behind the plate

Millsy
Millsy

Just tried the white "low density" palette and it works great. You can make your own palette with whatever colors you want. I have a red palette working fine, but going to fiddle with some more colors and I'll post something later today.

Millsy
Millsy

I know I've tried the xlim command. However, it's not necessarily the axes that are a concern (I can set those just fine). The function used to create the plots automatically chooses the range to smooth, and setting axes limits directly unfortunately does not set the range for the smoothing. By simply setting axes, it ends up leaving a bunch of blank area in the background, and the standard "bg" command won't fill it in. One suggestion I do have: just set your palette to have the 'lowest density' areas to be white. That way you won't be able to tell it's a bit wonky. I'll have a post on this soon. Thanks again for the link back.

Chris Quick
Chris Quick

>> One suggestion I do have: just set your palette to have the ‘lowest density’ areas to be white. That way you won’t be able to tell it’s a bit wonky. I’ll have a post on this soon. Thanks again for the link back. Heh. That's an interesting way to work around it. Maybe I'll try that later. Millsy is right about the smoothing function. It chooses the range based on data. You can change the axes, but you just get white area instead.

Chris Quick
Chris Quick

I've got a really 'hacky' idea on how to make it centered. I'll try it out later and see what happens. Thanks for stopping by!

TheFedman2002
TheFedman2002

My buddy uses R frequently, he said the following: "set xlim=c(-3,3) or something like that. There's also some command like par(pin=c(width,height))"

Millsy
Millsy

Thanks for the link back, Chris. The plots look good. Interesting to see Brian Wilson pitch Mariano Rivera-esque-y. If I figure anything out with the smoothing range (so it can be centered) I'll let you know.