Gilbert Brault преди 5 години
родител
ревизия
a98c699c60
променени са 2 файла, в които са добавени 134 реда и са изтрити 40 реда
  1. 51 40
      notebooks/DryFriction.ipynb
  2. 83 0
      notebooks/testmatplotlib.ipynb

Файловите разлики са ограничени, защото са твърде много
+ 51 - 40
notebooks/DryFriction.ipynb


+ 83 - 0
notebooks/testmatplotlib.ipynb

@@ -0,0 +1,83 @@
+{
+ "cells": [
+  {
+   "cell_type": "code",
+   "execution_count": 1,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "%matplotlib widget"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 15,
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stderr",
+     "output_type": "stream",
+     "text": [
+      "/srv/conda/envs/notebook/lib/python3.7/site-packages/ipykernel_launcher.py:8: MatplotlibDeprecationWarning: Adding an axes using the same arguments as a previous axes currently reuses the earlier instance.  In a future version, a new instance will always be created and returned.  Meanwhile, this warning can be suppressed, and the future behavior ensured, by passing a unique label to each axes instance.\n",
+      "  \n"
+     ]
+    },
+    {
+     "data": {
+      "application/vnd.jupyter.widget-view+json": {
+       "model_id": "91b1d26580444e20ad7378eceb45b26a",
+       "version_major": 2,
+       "version_minor": 0
+      },
+      "text/plain": [
+       "Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    }
+   ],
+   "source": [
+    "import matplotlib as mpl\n",
+    "import matplotlib.pyplot as plt\n",
+    "import numpy as np\n",
+    "from math import cos, pi\n",
+    "mpl.rc('text', usetex = True)\n",
+    "mpl.rc('font', family = 'serif')\n",
+    "plt.figure(1, figsize = (6, 4))\n",
+    "ax = plt.axes([0.1, 0.1, 0.8, 0.7])\n",
+    "t = np.arange(0.0, 1.0+0.01, 0.01)\n",
+    "s = np.cos(2*2*pi*t)+2\n",
+    "plt.plot(t, s)\n",
+    "\n",
+    "plt.xlabel(r'\\textbf{time (s)}')\n",
+    "plt.ylabel(r'\\textit{voltage (mV)}', fontsize = 16)\n",
+    "plt.title(r\"\\TeX\\ is Number $\\displaystyle\\sum_{n=1}^\\infty\\frac{-e^{i\\pi}}{2^n}$!\",\n",
+    "      fontsize = 16, color = 'r')\n",
+    "plt.grid(True)\n",
+    "plt.gcf().canvas"
+   ]
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.7.8"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 4
+}