|
1 | 1 | { |
2 | 2 | "metadata": { |
3 | | - "astropy-tutorials": { |
4 | | - "author": "Ana Bonaca <ana.bonaca@yale.edu>, Erik Tollerud <erik.tollerud@yale.edu>, Jonathan Foster <jonathan.b.foster@yale.edu>", |
5 | | - "date": "April 2014", |
6 | | - "name": "", |
7 | | - "link_name": "Using Astropy Quantites for astrophysical calculations", |
8 | | - "published": true |
9 | | - } |
| 3 | + "astropy-tutorials": { |
| 4 | + "author": "Ana Bonaca <ana.bonaca@yale.edu>, Erik Tollerud <erik.tollerud@yale.edu>, Jonathan Foster <jonathan.b.foster@yale.edu>", |
| 5 | + "date": "April 2014", |
| 6 | + "link_name": "Using Astropy Quantites for astrophysical calculations", |
| 7 | + "name": "", |
| 8 | + "published": true |
| 9 | + }, |
| 10 | + "signature": "sha256:0b60a6688134ca2541d6d959efb64c1fcb1f59665f6690d041fd4511837f7752" |
10 | 11 | }, |
11 | 12 | "nbformat": 3, |
12 | 13 | "nbformat_minor": 0, |
|
61 | 62 | "# It makes the \"random\" number generator always give the same numbers wherever you run it.\n", |
62 | 63 | "np.random.seed(12345)\n", |
63 | 64 | "\n", |
64 | | - "# Plotting setup for an ipython notebook\n", |
65 | | - "%matplotlib inline\n", |
66 | | - "fontsize = 18\n", |
67 | | - "plt.rcParams['axes.labelsize'] = fontsize\n", |
68 | | - "plt.rcParams['xtick.labelsize'] = fontsize\n", |
69 | | - "plt.rcParams['ytick.labelsize'] = fontsize" |
| 65 | + "# Set up matplotlib and use a nicer set of plot parameters\n", |
| 66 | + "%config InlineBackend.rc = {}\n", |
| 67 | + "import matplotlib\n", |
| 68 | + "matplotlib.rc_file(\"../../templates/matplotlibrc\")\n", |
| 69 | + "import matplotlib.pyplot as plt\n", |
| 70 | + "%matplotlib inline" |
70 | 71 | ], |
71 | 72 | "language": "python", |
72 | 73 | "metadata": {}, |
|
231 | 232 | "cell_type": "code", |
232 | 233 | "collapsed": false, |
233 | 234 | "input": [ |
| 235 | + "plt.figure()\n", |
234 | 236 | "plt.hist(v, bins=20, histtype=\"step\")\n", |
235 | 237 | "plt.xlabel(\"Velocity (km/s)\")\n", |
236 | 238 | "plt.ylabel(\"N\")" |
|
0 commit comments