|
8 | 8 | "name": "",
|
9 | 9 | "published": true
|
10 | 10 | },
|
11 |
| - "signature": "sha256:a78b3ed3bde79cc3f9b07b7539cdedaac5809b9ad6712f275581de7b20d547ad" |
| 11 | + "signature": "sha256:a425c6e39049c726c7fafca412f96596f6cfb20bb5c535f3f2937b0aa4e1065b" |
12 | 12 | },
|
13 | 13 | "nbformat": 3,
|
14 | 14 | "nbformat_minor": 0,
|
|
313 | 313 | "source": [
|
314 | 314 | "Here we simply make a scatter plot of the J-K color on the x-axis\n",
|
315 | 315 | "against the J magnitude on the y-axis. We use a trick to flip the\n",
|
316 |
| - "y-axis `ylim(reversed(ylim()))`. Called with no arguments,\n", |
317 |
| - "`ylim()` or `plt.ylim()` will return a tuple with the axis bounds, \n", |
| 316 | + "y-axis `plt.ylim(reversed(plt.ylim()))`. Called with no arguments,\n", |
| 317 | + "`plt.ylim()` will return a tuple with the axis bounds, \n", |
318 | 318 | "e.g. (0,10). Calling the function _with_ arguments will set the limits \n",
|
319 | 319 | "of the axis, so we simply set the limits to be the reverse of whatever they\n",
|
320 | 320 | "were before. Using this `pylab`-style plotting is convenient for\n",
|
|
327 | 327 | "collapsed": false,
|
328 | 328 | "input": [
|
329 | 329 | "plt.scatter(data[\"Jmag\"] - data[\"Kmag\"], data[\"Jmag\"]) # plot J-K vs. J\n",
|
330 |
| - "plt.ylim(reversed(ylim())) # flip the y-axis\n", |
| 330 | + "plt.ylim(reversed(plt.ylim())) # flip the y-axis\n", |
331 | 331 | "plt.xlabel(\"$J-K_s$\", fontsize=20)\n",
|
332 | 332 | "plt.ylabel(\"$J$\", fontsize=20)"
|
333 | 333 | ],
|
|
0 commit comments