{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# JupyterLab Classic" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Widgets" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "slideshow": { "slide_type": "fragment" } }, "outputs": [], "source": [ "from ipywidgets import IntSlider\n", "slider = IntSlider()\n", "slider" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "slider" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Rich Display" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from IPython.display import Latex\n", "Latex(r\"\"\"\\begin{eqnarray}\n", "\\nabla \\times \\vec{\\mathbf{B}} -\\, \\frac1c\\, \\frac{\\partial\\vec{\\mathbf{E}}}{\\partial t} & = \\frac{4\\pi}{c}\\vec{\\mathbf{j}} \\\\\n", "\\nabla \\cdot \\vec{\\mathbf{E}} & = 4 \\pi \\rho \\\\\n", "\\nabla \\times \\vec{\\mathbf{E}}\\, +\\, \\frac1c\\, \\frac{\\partial\\vec{\\mathbf{B}}}{\\partial t} & = \\vec{\\mathbf{0}} \\\\\n", "\\nabla \\cdot \\vec{\\mathbf{B}} & = 0 \n", "\\end{eqnarray}\"\"\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "import numpy as np\n", "\n", "x = np.linspace(0, 10, 100)\n", "\n", "plt.plot(x, np.sin(x))\n", "plt.plot(x, np.cos(x))\n", "\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from IPython.display import HTML\n", "from IPython.display import display\n", "\n", "s = \"\"\"
| Header 1 | \n", "Header 2 | \n", "
|---|---|
| row 1, cell 1 | \n", "row 1, cell 2 | \n", "
| row 2, cell 1 | \n", "row 2, cell 2 | \n", "