Last active
January 24, 2017 19:00
-
-
Save crawles/62a1a93f35446d07c8d27d28a14ccda8 to your computer and use it in GitHub Desktop.
For Spark blog tutorial
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from matplotlib import pyplot as plt | |
import seaborn as sns | |
plt.style.use('fivethirtyeight') | |
_df = fga_py.toPandas() | |
plt.plot(_df.yr,_df.fg3a_p36m, color = '#00a79c') | |
plt.xlabel('Year') | |
_=plt.title('Player average 3-point attempts (per 36 minutes)') | |
plt.annotate('3 pointer introduced', xy=(1980, .5), xytext=(1981, 1.1), fontsize = 12, | |
arrowprops=dict(facecolor='grey', shrink=0.05, linewidth = 2)) | |
plt.annotate('NBA moved in 3-point line', xy=(1996, 2.4), xytext=(1991.5, 2.7), fontsize = 12, | |
arrowprops=dict(facecolor='grey', shrink=0.05, linewidth = 2)) | |
plt.annotate('NBA moved back\n3-point line', xy=(1998, 2.), xytext=(1998.5, 2.4), fontsize = 12, arrowprops=dict(facecolor='grey', shrink=0.05, linewidth = 2)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment