| 1 |
{ |
| 2 |
"cells": [ |
| 3 |
{ |
| 4 |
"cell_type": "markdown", |
| 5 |
"metadata": {}, |
| 6 |
"source": [ |
| 7 |
"# XKCDify" |
| 8 |
] |
| 9 |
}, |
| 10 |
{ |
| 11 |
"cell_type": "markdown", |
| 12 |
"metadata": {}, |
| 13 |
"source": [ |
| 14 |
"This notebook serves no useful purpose. It just demonstrates a cool matplotlib function which makes a plot look like a hand drawn cartoon, similar to those on xkcd. Read more at jakes post here, \n", |
| 15 |
"\n", |
| 16 |
"http://jakevdp.github.io/blog/2013/07/10/XKCD-plots-in-matplotlib/" |
| 17 |
] |
| 18 |
}, |
| 19 |
{ |
| 20 |
"cell_type": "code", |
| 21 |
"execution_count": null, |
| 22 |
"metadata": { |
| 23 |
"collapsed": false |
| 24 |
}, |
| 25 |
"outputs": [], |
| 26 |
"source": [ |
| 27 |
"%matplotlib inline\n", |
| 28 |
"import matplotlib.pyplot as plt\n", |
| 29 |
"\n", |
| 30 |
"from skrf.data import ring_slot\n", |
| 31 |
"\n", |
| 32 |
"plt.xkcd() # from matplotlib version" |
| 33 |
] |
| 34 |
}, |
| 35 |
{ |
| 36 |
"cell_type": "code", |
| 37 |
"execution_count": null, |
| 38 |
"metadata": { |
| 39 |
"collapsed": false |
| 40 |
}, |
| 41 |
"outputs": [], |
| 42 |
"source": [ |
| 43 |
"plt.figure(figsize = (8,6))\n", |
| 44 |
"ring_slot.plot_s_db(title='Important Results')\n", |
| 45 |
"plt.ylim(-30,30)" |
| 46 |
] |
| 47 |
}, |
| 48 |
{ |
| 49 |
"cell_type": "code", |
| 50 |
"execution_count": null, |
| 51 |
"metadata": { |
| 52 |
"collapsed": false |
| 53 |
}, |
| 54 |
"outputs": [], |
| 55 |
"source": [ |
| 56 |
"plt.figure(figsize = (8,6))\n", |
| 57 |
"ring_slot.plot_s_smith()\n", |
| 58 |
"plt.title('Important Results')\n" |
| 59 |
] |
| 60 |
}, |
| 61 |
{ |
| 62 |
"cell_type": "code", |
| 63 |
"execution_count": null, |
| 64 |
"metadata": { |
| 65 |
"collapsed": false |
| 66 |
}, |
| 67 |
"outputs": [], |
| 68 |
"source": [] |
| 69 |
} |
| 70 |
], |
| 71 |
"metadata": { |
| 72 |
"anaconda-cloud": {}, |
| 73 |
"kernelspec": { |
| 74 |
"display_name": "Python [default]", |
| 75 |
"language": "python", |
| 76 |
"name": "python3" |
| 77 |
}, |
| 78 |
"language_info": { |
| 79 |
"codemirror_mode": { |
| 80 |
"name": "ipython", |
| 81 |
"version": 3 |
| 82 |
}, |
| 83 |
"file_extension": ".py", |
| 84 |
"mimetype": "text/x-python", |
| 85 |
"name": "python", |
| 86 |
"nbconvert_exporter": "python", |
| 87 |
"pygments_lexer": "ipython3", |
| 88 |
"version": "3.8.10" |
| 89 |
} |
| 90 |
}, |
| 91 |
"nbformat": 4, |
| 92 |
"nbformat_minor": 0 |
| 93 |
} |