Commit dbf42712 authored by Christian Rohlfing's avatar Christian Rohlfing

- used matplotlib widget instead of ... notebook

- hopefully postBuild and requirements.txt are working fine
parent bfc1ce19
......@@ -3,10 +3,15 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"jupyter": {
"source_hidden": true
}
},
"outputs": [],
"source": [
"%matplotlib notebook\n",
"# Copyright 2019 Institut für Nachrichtentechnik, RWTH Aachen University\n",
"%matplotlib widget\n",
"\n",
"from ipywidgets import interact, interactive, fixed, HBox, VBox\n",
"import ipywidgets as widgets\n",
......@@ -105,5 +110,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
......@@ -9,7 +9,7 @@
"outputs": [],
"source": [
"# Copyright 2019 Institut für Nachrichtentechnik, RWTH Aachen University\n",
"%matplotlib notebook\n",
"%matplotlib widget\n",
"\n",
"import ipywidgets as widgets\n",
"from ipywidgets import interact, interactive\n",
......@@ -214,9 +214,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.7"
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
......@@ -7,7 +7,7 @@
"outputs": [],
"source": [
"# Copyright 2019 Institut für Nachrichtentechnik, RWTH Aachen University\n",
"%matplotlib notebook\n",
"%matplotlib widget\n",
"\n",
"from ient_nb.ient_plots import *"
]
......@@ -120,5 +120,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
......@@ -9,7 +9,7 @@
"outputs": [],
"source": [
"# Copyright 2019 Institut für Nachrichtentechnik, RWTH Aachen University\n",
"%matplotlib notebook\n",
"%matplotlib widget\n",
"\n",
"from ipywidgets import interact, interactive\n",
"import ipywidgets as widgets\n",
......@@ -48,9 +48,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true
},
"metadata": {},
"outputs": [],
"source": [
"fig,ax = plt.subplots(1,1); ax.plot(t, gauss(t));\n",
......@@ -250,9 +248,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true
},
"metadata": {},
"outputs": [],
"source": [
"# Plot\n",
......@@ -281,12 +277,13 @@
"\n",
"# Plot & demo\n",
"fig, ax = plt.subplots(1, 1, figsize=(8, 4))\n",
"@widgets.interact(T=widgets.FloatSlider(min=0.25, max=4, value=1, step=.1, description=r'Dehnung $T$', style=ient_wdgtl_style), \n",
"@widgets.interact(T=widgets.FloatSlider(min=-4, max=4, value=1, step=.1, description=r'Dehnung $T$', style=ient_wdgtl_style), \n",
" t0=widgets.FloatSlider(min=-2, max=2, value=0, step=.1, description=r'Verschiebung $t_0$', style=ient_wdgtl_style),\n",
" reflection=widgets.Checkbox(value=False, description='Spiegelung', style=ient_wdgtl_style))\n",
"def update_signals(T, t0, reflection):\n",
" if reflection:\n",
" T = -T\n",
" T = 0.1 if T==0 else T\n",
" T = -T if reflection else T\n",
" \n",
" s_plot = s((t-t0)/T)\n",
" \n",
" if not ax.lines: # plot s(t) and g(t)\n",
......@@ -343,5 +340,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
......@@ -4,12 +4,15 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
"hide_input": true,
"jupyter": {
"source_hidden": true
}
},
"outputs": [],
"source": [
"# Copyright 2019 Institut für Nachrichtentechnik, RWTH Aachen University\n",
"%matplotlib notebook\n",
"%matplotlib widget\n",
"\n",
"import ipywidgets as widgets\n",
"from ipywidgets import interact, interactive, fixed, Layout\n",
......@@ -67,7 +70,10 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
"hide_input": true,
"jupyter": {
"source_hidden": true
}
},
"outputs": [],
"source": [
......@@ -86,17 +92,9 @@
" 'Rampe' : lambda t: t*rect(t-0.5), \n",
" 'Versch. Rechteck' : lambda t: -rect(t-0.5),\n",
" 'Eigene Kreation s0(t)' : s_0,\n",
" }"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
},
"outputs": [],
"source": [
" }\n",
"\n",
"# Plot\n",
"fig0, axs0 = plt.subplots(1, 2, figsize=(8,2))\n",
"@widgets.interact(s_type=widgets.Dropdown(options=list(signal_types.keys()), description=r'Wähle $s(t)$:'),\n",
" s_T=widgets.FloatSlider(min=0.5, max=4, value=1, step=.1, description=r'Dehnung T', style=ient_wdgtl_style), \n",
......@@ -141,7 +139,10 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
"hide_input": true,
"jupyter": {
"source_hidden": true
}
},
"outputs": [],
"source": [
......@@ -226,5 +227,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
......@@ -7,7 +7,7 @@
"outputs": [],
"source": [
"# Copyright 2019 Institut für Nachrichtentechnik, RWTH Aachen University\n",
"%matplotlib notebook\n",
"%matplotlib widget\n",
"\n",
"from ipywidgets import interact, interactive\n",
"import ipywidgets as widgets\n",
......@@ -36,7 +36,7 @@
"Das Faltungsintegral ist definiert als\n",
"$$g(t) \n",
"= s(t)\\ast h(t)\n",
"= \\int\\limits_{-\\infty}^{\\infty} s(\\tau) h(t-\\tau) \\mathrm{d}\\tau$$."
"= \\int\\limits_{-\\infty}^{\\infty} s(\\tau) h(t-\\tau) \\mathrm{d}\\tau\\text{ .}$$"
]
},
{
......@@ -341,5 +341,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<div>\n",
" <img src=\"ient_nb/figures/rwth_ient_logo@2x.png\" style=\"float: right;height: 5em;\">\n",
"</div>\n",
"\n",
"# Diskrete Fourier-Transformation"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"jupyter": {
"source_hidden": true
}
},
"outputs": [],
"source": [
"%matplotlib notebook\n",
"# Copyright 2019 Institut für Nachrichtentechnik, RWTH Aachen University\n",
"%matplotlib widget\n",
"\n",
"from ipywidgets import interact, interactive, fixed\n",
"import ipywidgets as widgets\n",
......@@ -32,6 +26,17 @@
" display(Audio(s, rate=fs, autoplay=autoplay))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<div>\n",
" <img src=\"ient_nb/figures/rwth_ient_logo@2x.png\" style=\"float: right;height: 5em;\">\n",
"</div>\n",
"\n",
"# Diskrete Fourier-Transformation"
]
},
{
"cell_type": "code",
"execution_count": null,
......@@ -175,5 +180,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
......@@ -3,11 +3,15 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"jupyter": {
"source_hidden": true
}
},
"outputs": [],
"source": [
"# Copyright 2019 Institut für Nachrichtentechnik, RWTH Aachen University\n",
"%matplotlib notebook\n",
"%matplotlib widget\n",
"\n",
"import ipywidgets as widgets\n",
"from ipywidgets import interact, interactive\n",
......@@ -194,9 +198,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.7"
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
......@@ -3,12 +3,15 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"jupyter": {
"source_hidden": true
}
},
"outputs": [],
"source": [
"# Copyright 2019 Institut für Nachrichtentechnik, RWTH Aachen University\n",
"\n",
"%matplotlib notebook\n",
"%matplotlib widget\n",
"from ipywidgets import interact, interactive, fixed, HBox, VBox\n",
"import ipywidgets as widgets\n",
"from IPython.display import clear_output, display, HTML\n",
......@@ -230,5 +233,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
......@@ -3,11 +3,15 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"jupyter": {
"source_hidden": true
}
},
"outputs": [],
"source": [
"# Copyright 2019 Institut für Nachrichtentechnik, RWTH Aachen University\n",
"%matplotlib notebook\n",
"%matplotlib widget\n",
"\n",
"from ipywidgets import interact, interactive, fixed, interact_manual\n",
"import ipywidgets as widgets\n",
......@@ -69,7 +73,9 @@
"execution_count": null,
"metadata": {
"hide_input": true,
"scrolled": false
"jupyter": {
"source_hidden": true
}
},
"outputs": [],
"source": [
......@@ -108,7 +114,8 @@
" if len(annotations): annotations[0].remove(); annotations[1].remove();\n",
" if show_lines:\n",
" con = ConnectionPatch(xyA=xyP, xyB=xyI, axesA=axs[0,0], axesB=axs[0,1],**anno_args); axs[0,0].add_artist(con)\n",
" con = ConnectionPatch(xyA=xyP, xyB=xyR, axesA=axs[0,0], axesB=axs[1,0],**anno_args); axs[0,0].add_artist(con)"
" con = ConnectionPatch(xyA=xyP, xyB=xyR, axesA=axs[0,0], axesB=axs[1,0],**anno_args); axs[0,0].add_artist(con)\n",
" axs[1,0].set_xlim(axs[0,0].get_xlim()); axs[0,1].set_ylim(axs[0,0].get_ylim())"
]
},
{
......@@ -142,5 +149,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
......@@ -3,11 +3,15 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"jupyter": {
"source_hidden": true
}
},
"outputs": [],
"source": [
"# Copyright 2019 Institut für Nachrichtentechnik, RWTH Aachen University\n",
"%matplotlib notebook\n",
"%matplotlib widget\n",
"\n",
"from ipywidgets import interact, interactive\n",
"import ipywidgets as widgets\n",
......@@ -343,7 +347,11 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"jupyter": {
"source_hidden": true
}
},
"outputs": [],
"source": [
"(f,deltaf) = np.linspace(-2, 2, 10001, retstep=True) # f-axis\n",
......@@ -406,5 +414,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
......@@ -3,11 +3,15 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"jupyter": {
"source_hidden": true
}
},
"outputs": [],
"source": [
"# Copyright 2019 Institut für Nachrichtentechnik, RWTH Aachen University\n",
"%matplotlib notebook\n",
"%matplotlib widget\n",
"\n",
"from ipywidgets import interact, interactive\n",
"import ipywidgets as widgets\n",
......@@ -136,7 +140,10 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
"hide_input": true,
"jupyter": {
"source_hidden": true
}
},
"outputs": [],
"source": [
......@@ -231,5 +238,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
......@@ -3,10 +3,14 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"jupyter": {
"source_hidden": true
}
},
"outputs": [],
"source": [
"%matplotlib notebook\n",
"%matplotlib widget\n",
"\n",
"from ipywidgets import interact, interactive, fixed\n",
"import ipywidgets as widgets\n",
......@@ -198,9 +202,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.7"
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
......@@ -3,10 +3,15 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"jupyter": {
"source_hidden": true
}
},
"outputs": [],
"source": [
"%matplotlib notebook\n",
"# Copyright 2019 Institut für Nachrichtentechnik, RWTH Aachen University\n",
"%matplotlib widget\n",
"\n",
"from ipywidgets import interact, interactive, fixed\n",
"import ipywidgets as widgets\n",
......@@ -231,7 +236,11 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"jupyter": {
"source_hidden": true
}
},
"outputs": [],
"source": [
"fig,axs = plt.subplots(2,1); \n",
......@@ -291,5 +300,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
......@@ -9,7 +9,7 @@
"outputs": [],
"source": [
"# Copyright 2019 Institut für Nachrichtentechnik, RWTH Aachen University\n",
"%matplotlib notebook\n",
"%matplotlib widget\n",
"\n",
"from ipywidgets import interact, interactive, fixed, interact_manual\n",
"import ipywidgets as widgets\n",
......@@ -265,5 +265,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
jupyter contrib nbextension install --user
jupyter nbextension enable hide_input/main
\ No newline at end of file
jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter labextension install jupyter-matplotlib
\ No newline at end of file
numpy==1.16.3
scipy==1.2.1
matplotlib==3.1.0
jupyter-contrib-nbextensions
\ No newline at end of file
numpy==1.16.4
scipy==1.3.1
matplotlib==3.1.1
jupyterlab==1.0.9
nodejs=12.8.1
ipympl==0.3.3
\ No newline at end of file
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