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

Ease last plotting execise

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