Commit 52328bd7 authored by Inigo Aldazabal's avatar Inigo Aldazabal

Ease last plotting execise

parent 8c19e710
...@@ -169,13 +169,13 @@ ...@@ -169,13 +169,13 @@
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"Plot the function \n", "Adapt the previous example to plot the function \n",
"\n", "\n",
"$$y = \\frac{\\sin(x)}{x}, \\; x\\in[0.1, 6\\pi]$$\n", "$$y = \\frac{\\sin(x)}{x}, \\; x\\in[0.1, 6\\pi]$$\n",
"\n", "\n",
"and try to \n", "and try to \n",
"\n", "\n",
"* set the figure *legend*\n", "* set the figure *legend* (hint: `<TAB>` completion is your friend)\n",
"* change the *line style*\n", "* change the *line style*\n",
"\n", "\n",
"hint: checkout the [matplotlib examples](http://matplotlib.org/examples/index.html)" "hint: checkout the [matplotlib examples](http://matplotlib.org/examples/index.html)"
...@@ -210,7 +210,7 @@ ...@@ -210,7 +210,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.6.1" "version": "3.6.2"
} }
}, },
"nbformat": 4, "nbformat": 4,
......
...@@ -76,7 +76,9 @@ ...@@ -76,7 +76,9 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": {}, "metadata": {
"collapsed": true
},
"outputs": [], "outputs": [],
"source": [ "source": [
"x = np.linspace(0, 4.*np.pi, 100)\n", "x = np.linspace(0, 4.*np.pi, 100)\n",
...@@ -87,7 +89,9 @@ ...@@ -87,7 +89,9 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": {}, "metadata": {
"collapsed": true
},
"outputs": [], "outputs": [],
"source": [ "source": [
"plt.plot(x, y, 'o') # dot plot" "plt.plot(x, y, 'o') # dot plot"
...@@ -96,7 +100,9 @@ ...@@ -96,7 +100,9 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": {}, "metadata": {
"collapsed": true
},
"outputs": [], "outputs": [],
"source": [ "source": [
"plt.plot(x, y)\n", "plt.plot(x, y)\n",
...@@ -113,7 +119,9 @@ ...@@ -113,7 +119,9 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": {}, "metadata": {
"collapsed": true
},
"outputs": [], "outputs": [],
"source": [ "source": [
"image = np.random.rand(30, 30)\n", "image = np.random.rand(30, 30)\n",
...@@ -155,7 +163,9 @@ ...@@ -155,7 +163,9 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": {}, "metadata": {
"collapsed": true
},
"outputs": [], "outputs": [],
"source": [ "source": [
"x = np.linspace( 0., 4.*np.pi, num=200 )\n", "x = np.linspace( 0., 4.*np.pi, num=200 )\n",
...@@ -186,7 +196,9 @@ ...@@ -186,7 +196,9 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": {}, "metadata": {
"collapsed": true
},
"outputs": [], "outputs": [],
"source": [ "source": [
"r = np.arange(0, 2., 0.01)\n", "r = np.arange(0, 2., 0.01)\n",
...@@ -209,13 +221,13 @@ ...@@ -209,13 +221,13 @@
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"Plot the function \n", "Adapt the previous example to plot the function \n",
"\n", "\n",
"$$y = \\frac{\\sin(x)}{x}, \\; x\\in[0.1, 6\\pi]$$\n", "$$y = \\frac{\\sin(x)}{x}, \\; x\\in[0.1, 6\\pi]$$\n",
"\n", "\n",
"and try to \n", "and try to \n",
"\n", "\n",
"* set the figure *legend*\n", "* set the figure *legend* (hint: `<TAB>` completion is your friend)\n",
"* change the *line style*\n", "* change the *line style*\n",
"\n", "\n",
"hint: checkout the [matplotlib examples](http://matplotlib.org/examples/index.html)" "hint: checkout the [matplotlib examples](http://matplotlib.org/examples/index.html)"
...@@ -224,7 +236,9 @@ ...@@ -224,7 +236,9 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": {}, "metadata": {
"collapsed": true
},
"outputs": [], "outputs": [],
"source": [ "source": [
"# %load files/sol_sinc.py" "# %load files/sol_sinc.py"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment