Graph pitches and the strike zone, with different ways to color code
1 2 3 4 5 |
batter |
Defaults to "all". Input either a name or FanGraphs playerid. |
pitcher |
Defaults to "all". Input either a name or FanGraphs playerid. |
count |
Ball-strike count. Defaults to all. Input x instead of a number to get all counts; e.g. "3-x" for all 3-ball counts |
startdate |
Start date. Format yyyy-mm-dd. Defaults to 2016-01-01. |
enddate |
End date. Format yyyy-mm-dd. Defaults to 2017-01-01. |
year |
The year. Overrides startdate and enddate. Can only be one full year – use startdate and enddate for full control over date range. |
stand |
Batter handedness. Defaults to both. |
throws |
Pitcher handedness. Defaults to both. |
size |
Size of the points on the graph. |
heatmap |
Defaults to FALSE. |
pitchtypes |
Defaults to all. To include multiple pitch types, create an array: c("Four-seam fastball","Changeup","Breaking ball") |
color.code |
What the colors of the points signify. Defaults to "pitchtype". Other options: result, hittype, biptype. Must be in quotation marks. |
plot.title |
The title of the plot. Leave default unless you want a specific custom title. |
save |
Whether to save the graph. Defaults to FALSE. |
path |
Where to save the graph. Defaults to the current working directory. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.