clock menu more-arrow no yes

Filed under:

Graphing 201: PITCHf/x Flight Paths

New, 20 comments

At this point, I'm going to assume you know how to grab data and deal with charts and formulas in Excel, at least at a basic level. Check out the earlier tutorial threads (all linked from here) as there are lots of goodies in the comments.

Once you've completed the Graphing 101 series, you'll be cooking with gas. Or gassed. Or gassy. YMMV. 

Flight Paths


You'll need two things to do create your own flight path graphs. First, grab the template file (Excel; revised version - see notes and comments below). Second, grab some data.

The numbers you need for a flight path are the nine basic fields of PITCHf/x, the numbers that the whole path is built from. There are three components -- initial location, initial velocity, and (initial) acceleration -- each with x, y, and z coordinates. PITCHf/x provides the initial values, and physics equations provide the trajectory.

Initial location is better known as release point, which is actually a bit of a misnomer. Gameday sets the release point at 50 feet along the mound-plate axis, but the other eight values will vary from pitch to pitch.

By the way, that 50 foot measurement is from the back of home plate. The front of home plate is actually 1.417 feet closer, which is a very important piece of information, already reflected in the template. Also, I move the release points back to 55 feet, mor in line with where a pitcher actually releases the ball and recalculate the rest of the location and velocity components. PITCHf/x assumes the acceleration is constant, which is a pretty good assumption, and is why we're dealing with parabolic, second-degree equations.


The data columns you need to grab are  x0 y0 z0 vx0 vy0 vz0 ax ay az

Note: the order of the fields in the spreadsheet are not as described - see the first comment below, and I'm updating the file a revised version has been posted [Dan, let me know if that's right now].

I almost always aggregate pitches, and flight the "typical" path. Using the data straight from Gameday means you're grabbing each pitch separately. Since you've probably just imported a whole pitcher's game into Excel, just use the built in Excel function to average out the values by pitch type, using the Gameday classification or your own. Whatever you want. One fun thing to do is to chart a high fastball and an average curve or change-up.

Once you have the data you want, you'll need to insert the nine values into the template file.

  • The values go in the order listed above and start, for each pitch, in column F and end in column N.
  • I include a variety of optional fields elsewhere, but those are the ones you need.
  • Once you've pasted in the values for a pitch, the time line will automatically update. And so will the charts.

Tweaking the Charts

The two charts are built from the time line data. Since the time line is nothing but a bunch of formulas, you don't need to touch them (see below on adding more pitches, and time lines). But the charts you'll probably want to work with and improve.

Changing the colors and shapes is something Clippy can help you with, so I'll just point out the labels are built from columns A through C. You can easily adjust that to a single column or whatever by editing the source data (right-click on the chart and pick the appropriate option). For help with the resulting dialog box, again, I'll suggest Clippy.

Adding More Pitches

The template provides room for three, but you can add more. Be careful, since some graphs end up harder to read at four pitches, and five and above can be tough on the eyes.

As is, the template has room for nine pitches, but you can insert rows to your heart's content. As if nine isn't enough.

The trick is adding to the time line. There are some notes in the template file, and I'll expand on those here.

  1. Select and copy A24:A26 and paste in A28:A30. The way the formulas are set-up, you'll need to manually correct the cell references in the new entries you've created in A28:A30.
  2. Double click A28. You'll notice a box will surround the cells that are referenced in the formula.
  3. You'll need to move three boxes. F8 to F5, I8 to I5 and L8 to L5. You can do that by dragging the little boxes or by editing the formula in the cell itself. (corrected cell references from row  to row )
  4. You'll then need to do the same thing for A29 and A30, the columns shift to the right one spot each, so you'll be working with G,J,M and H,K,N instead of F,I,L as shown in step 3.
  5. Select A28:Y30 and fill right. That will copy the adjusted formula to the end of the time line.

Repeat the process for each additional pitch, just shift on down the ladder each time. And feel free to record yourself a Macro, create different sized templates etc. to make your life easier in the long run.

Now you need to add the pitches to the charts.

  1. Right click one of the charts and choose "Source Data"
  2. Select the "Series" tab
  3. Take note of the cell ranges for the other pitches
  4. Click the "add" button
  5. For both views, the x axis of the chart uses the "y" locations from the time line (starting at 50, or 55 if you adjusted y0, Mr. Math) and are the middle row in the time line for each pitch
  6. For the first base view, the y axis of the chart refers to the "z" or height locations of the pitch.  Those are found in the bottom row of the time line for each pitch
  7. For the bird's eye view, the y axis of the chart refers to the "x" or horizontal locations of the pitch.  Those are found in the top row of the time line for each pitch

Making a Web Friendly Graphic

There are a lot of ways to do this, here's one. Once you've got your pitches and your lines and bubbles and labels ready to go, open your favorite graphics editor. Paint will do.

Start with the first base view chart. You'll need to select the entire chart, so just click anywhere in the white area above the flight path. Copy and paste that into whatever you're using to make the image. Now, go and do the same thing with the bird's eye, and paste it into the same image file.

If you're just using Paint and being crude with it (which is a good description of my technique), you'll seemingly cover the first base view with the bird's eye. Without de-selecting the pasted region, just drag it up the screen until you have both panes visible, bird's eye above first base.


Questions? (Besides the catcher's view, that's another post altogether.)  Leave 'em in the comments. As time allows and need arises, we'll probably add some screenshots. Feel free to leave your own in the comments.  And share your work!  Creative uses and improvements for the chart would be great to see (steal).  Let's make it an open source effort.