sz_graph: Graph pitches and the strike zone, with different ways to...

Description Usage Arguments

Description

Graph pitches and the strike zone, with different ways to color code

Usage

1
2
3
4
5
sz_graph(batter = "all", pitcher = "all", count = "all",
  startdate = "2016-01-01", enddate = "2016-12-31", year = 0,
  stand = "R','L", throws = "R','L", size = 3, heatmap = FALSE,
  pitchtypes = "all", color.code = "pitchtype", plot.title = "default",
  save = FALSE, path = getwd())

Arguments

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.


BillPetti/fgrapher documentation built on May 5, 2019, 3:46 p.m.