{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "92ea52c2",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-03T17:10:19.309799Z",
     "iopub.status.busy": "2022-04-03T17:10:19.308793Z",
     "iopub.status.idle": "2022-04-03T17:10:19.512787Z",
     "shell.execute_reply": "2022-04-03T17:10:19.512787Z"
    }
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "np.set_printoptions(precision=5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "99c83946",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-03T17:10:19.517795Z",
     "iopub.status.busy": "2022-04-03T17:10:19.517795Z",
     "iopub.status.idle": "2022-04-03T17:10:22.574340Z",
     "shell.execute_reply": "2022-04-03T17:10:22.573336Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 7704 characters]\n",
      "text/plain": [
       "<Figure size 864x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "filenames": {
       "image/png": "C:\\Users\\David\\OneDrive\\Desktop\\imwspy\\stanpy\\stanpy\\docs\\_build\\jupyter_execute\\user_guide\\reduction_method_1_0.png"
      },
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import stanpy as stp\n",
    "\n",
    "EI = 32000  # kN/m2\n",
    "l = 6  # m\n",
    "\n",
    "hinged_support = {\"w\": 0, \"M\": 0}\n",
    "roller_support = {\"w\": 0, \"M\": 0, \"H\": 0}\n",
    "fixed_support = {\"w\": 0, \"phi\": 0}\n",
    "\n",
    "s1 = {\"EI\": EI, \"l\": l, \"bc_i\": hinged_support, \"bc_k\": {\"w\": 0}, \"q\": 10}\n",
    "s2 = {\"EI\": EI, \"l\": l, \"bc_k\": roller_support}\n",
    "\n",
    "s = [s1, s2]\n",
    "\n",
    "fig, ax = plt.subplots(figsize=(12, 5))\n",
    "stp.plot_system(ax, *s)\n",
    "stp.plot_load(ax, *s)\n",
    "ax.set_ylim(-0.5,1)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "b4efd7ff",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-03T17:10:22.577341Z",
     "iopub.status.busy": "2022-04-03T17:10:22.577341Z",
     "iopub.status.idle": "2022-04-03T17:10:22.603342Z",
     "shell.execute_reply": "2022-04-03T17:10:22.603342Z"
    }
   },
   "outputs": [],
   "source": [
    "dx = 1e-9\n",
    "x_annotate = np.array([l - dx, l, 2 * l])\n",
    "x = np.sort(np.append(np.linspace(0, 2 * l, 1000), x_annotate))\n",
    "Zi, Zk = stp.tr_solver(*s)\n",
    "Fxx = stp.tr(*s, x=x)\n",
    "Z_x = Fxx.dot(Zi).round(10)\n",
    "\n",
    "w_x = Z_x[:, 0]\n",
    "phi_x = Z_x[:, 1]\n",
    "M_x = Z_x[:, 2]\n",
    "V_x = Z_x[:, 3]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "efa8880d",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-03T17:10:22.607340Z",
     "iopub.status.busy": "2022-04-03T17:10:22.607340Z",
     "iopub.status.idle": "2022-04-03T17:10:22.888338Z",
     "shell.execute_reply": "2022-04-03T17:10:22.888338Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 31976 characters]\n",
      "text/plain": [
       "<Figure size 864x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "filenames": {
       "image/png": "C:\\Users\\David\\OneDrive\\Desktop\\imwspy\\stanpy\\stanpy\\docs\\_build\\jupyter_execute\\user_guide\\reduction_method_3_0.png"
      },
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "scale = 0.5\n",
    "\n",
    "fig, ax = plt.subplots(figsize=(12, 5))\n",
    "stp.plot_system(ax, *s)\n",
    "stp.plot_solution(\n",
    "    ax,\n",
    "    x=x,\n",
    "    y=M_x,\n",
    "    annotate_x=[0, x[M_x == np.max(M_x)], l, 2 * l],\n",
    "    fill_p=\"red\",\n",
    "    fill_n=\"blue\",\n",
    "    scale=scale,\n",
    "    alpha=0.2,\n",
    "    flip_y=True\n",
    ")\n",
    "\n",
    "ax.grid(linestyle=\":\")\n",
    "ax.set_axisbelow(True)\n",
    "ax.set_ylim(-1.0, 0.8)\n",
    "ax.set_ylabel(\"M/Mmax*{}\".format(scale))\n",
    "ax.set_title(\"[M] = kNm\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "43a55059",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-03T17:10:22.892345Z",
     "iopub.status.busy": "2022-04-03T17:10:22.892345Z",
     "iopub.status.idle": "2022-04-03T17:10:23.128350Z",
     "shell.execute_reply": "2022-04-03T17:10:23.128350Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 29196 characters]\n",
      "text/plain": [
       "<Figure size 864x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "filenames": {
       "image/png": "C:\\Users\\David\\OneDrive\\Desktop\\imwspy\\stanpy\\stanpy\\docs\\_build\\jupyter_execute\\user_guide\\reduction_method_4_0.png"
      },
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "scale = 0.5\n",
    "\n",
    "fig, ax = plt.subplots(figsize=(12, 5))\n",
    "stp.plot_system(ax, *s)\n",
    "stp.plot_solution(\n",
    "    ax,\n",
    "    x=x,\n",
    "    y=V_x,\n",
    "    annotate_x=[0, l,l-dx, 2 * l],\n",
    "    fill_p=\"red\",\n",
    "    fill_n=\"blue\",\n",
    "    scale=scale,\n",
    "    alpha=0.2,\n",
    ")\n",
    "\n",
    "ax.grid(linestyle=\":\")\n",
    "ax.set_axisbelow(True)\n",
    "ax.set_ylim(-1.0, 0.8)\n",
    "ax.set_ylabel(\"V/Vmax*{}\".format(scale))\n",
    "ax.set_title(\"[V] = kN\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "d118a41d",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-03T17:10:23.132350Z",
     "iopub.status.busy": "2022-04-03T17:10:23.131350Z",
     "iopub.status.idle": "2022-04-03T17:10:23.504350Z",
     "shell.execute_reply": "2022-04-03T17:10:23.503352Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 21308 characters]\n",
      "text/plain": [
       "<Figure size 864x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "filenames": {
       "image/png": "C:\\Users\\David\\OneDrive\\Desktop\\imwspy\\stanpy\\stanpy\\docs\\_build\\jupyter_execute\\user_guide\\reduction_method_5_0.png"
      },
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "scale = 0.2\n",
    "fig, ax = plt.subplots(figsize=(12, 5))\n",
    "stp.plot_system(ax, *s, lw=1, linestyle=\":\", c=\"#111111\")\n",
    "stp.plot_solution(ax, x=x, y=w_x, scale=scale, linestyle=\"-\", flip_y=True, lw=2)\n",
    "ax.grid(linestyle=\":\")\n",
    "ax.set_axisbelow(True)\n",
    "ax.set_ylim(-1.5, 1.5)\n",
    "ax.set_ylabel(\"w/wmax*{}\".format(scale))\n",
    "ax.set_title(\"[w] = m\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "d41714fb",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-03T17:10:23.508350Z",
     "iopub.status.busy": "2022-04-03T17:10:23.508350Z",
     "iopub.status.idle": "2022-04-03T17:10:23.684351Z",
     "shell.execute_reply": "2022-04-03T17:10:23.683353Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 8472 characters]\n",
      "text/plain": [
       "<Figure size 864x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "filenames": {
       "image/png": "C:\\Users\\David\\OneDrive\\Desktop\\imwspy\\stanpy\\stanpy\\docs\\_build\\jupyter_execute\\user_guide\\reduction_method_6_0.png"
      },
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import stanpy as stp\n",
    "\n",
    "EI = 32000  # kN/m2\n",
    "P = 4  # kN\n",
    "l = 6  # m\n",
    "\n",
    "hinged_support = {\"w\": 0, \"M\": 0}\n",
    "roller_support = {\"w\": 0, \"M\": 0, \"H\": 0}\n",
    "fixed_support = {\"w\": 0, \"phi\": 0}\n",
    "\n",
    "s1 = {\"EI\": EI, \"l\": l, \"bc_i\": fixed_support, \"bc_k\": {\"w\": 0}, \"q\": 10, \"P\": (P, l / 2)}\n",
    "s2 = {\"EI\": EI, \"l\": l, \"bc_k\": roller_support}\n",
    "\n",
    "s = [s1, s2]\n",
    "\n",
    "fig, ax = plt.subplots(figsize=(12, 5))\n",
    "stp.plot_system(ax, *s)\n",
    "stp.plot_load(ax, *s)\n",
    "ax.set_ylim(-0.5,1.5)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "3d0e2106",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-03T17:10:23.688350Z",
     "iopub.status.busy": "2022-04-03T17:10:23.688350Z",
     "iopub.status.idle": "2022-04-03T17:10:23.728347Z",
     "shell.execute_reply": "2022-04-03T17:10:23.728347Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[3.]\n"
     ]
    }
   ],
   "source": [
    "dx = 1e-9\n",
    "x_annotate = np.array([l/2, l/2-dx, l - dx, l, 2*l])\n",
    "x = np.sort(np.append(np.linspace(0, 2 * l, 1000), x_annotate))\n",
    "print(x[x==l/2])\n",
    "Zi, Zk = stp.tr_solver(*s)\n",
    "Fxx = stp.tr(*s, x=x)\n",
    "Z_x = Fxx.dot(Zi).round(10)\n",
    "\n",
    "w_x = Z_x[:, 0]\n",
    "phi_x = Z_x[:, 1]\n",
    "M_x = Z_x[:, 2]\n",
    "V_x = Z_x[:, 3]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "75be5d2b",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-03T17:10:23.732352Z",
     "iopub.status.busy": "2022-04-03T17:10:23.731349Z",
     "iopub.status.idle": "2022-04-03T17:10:23.939093Z",
     "shell.execute_reply": "2022-04-03T17:10:23.939093Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 30460 characters]\n",
      "text/plain": [
       "<Figure size 864x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "filenames": {
       "image/png": "C:\\Users\\David\\OneDrive\\Desktop\\imwspy\\stanpy\\stanpy\\docs\\_build\\jupyter_execute\\user_guide\\reduction_method_8_0.png"
      },
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "scale = 0.5\n",
    "\n",
    "fig, ax = plt.subplots(figsize=(12, 5))\n",
    "stp.plot_system(ax, *s)\n",
    "stp.plot_solution(\n",
    "    ax,\n",
    "    x=x,\n",
    "    y=M_x,\n",
    "    annotate_x=[0, x[M_x == np.max(M_x)], l, 2 * l],\n",
    "    fill_p=\"red\",\n",
    "    fill_n=\"blue\",\n",
    "    scale=scale,\n",
    "    alpha=0.2,\n",
    "    flip_y=True\n",
    ")\n",
    "\n",
    "ax.grid(linestyle=\":\")\n",
    "ax.set_axisbelow(True)\n",
    "ax.set_ylim(-1.0, 1)\n",
    "ax.set_ylabel(\"M/Mmax*{}\".format(scale))\n",
    "ax.set_title(\"[M] = kNm\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "db9a1289",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-03T17:10:23.943096Z",
     "iopub.status.busy": "2022-04-03T17:10:23.943096Z",
     "iopub.status.idle": "2022-04-03T17:10:24.179094Z",
     "shell.execute_reply": "2022-04-03T17:10:24.179094Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 30112 characters]\n",
      "text/plain": [
       "<Figure size 864x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "filenames": {
       "image/png": "C:\\Users\\David\\OneDrive\\Desktop\\imwspy\\stanpy\\stanpy\\docs\\_build\\jupyter_execute\\user_guide\\reduction_method_9_0.png"
      },
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "scale = 0.5\n",
    "\n",
    "fig, ax = plt.subplots(figsize=(12, 5))\n",
    "stp.plot_system(ax, *s)\n",
    "stp.plot_solution(\n",
    "    ax,\n",
    "    x=x,\n",
    "    y=V_x,\n",
    "    annotate_x=[0, [l/2-dx, l/2], l - dx, l, 2*l],\n",
    "    fill_p=\"red\",\n",
    "    fill_n=\"blue\",\n",
    "    scale=scale,\n",
    "    alpha=0.2,\n",
    ")\n",
    "\n",
    "ax.grid(linestyle=\":\")\n",
    "ax.set_axisbelow(True)\n",
    "ax.set_ylim(-1.0, 1)\n",
    "ax.set_ylabel(\"V/Vmax*{}\".format(scale))\n",
    "ax.set_title(\"[V] = kN\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "23e939f5",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-03T17:10:24.183096Z",
     "iopub.status.busy": "2022-04-03T17:10:24.183096Z",
     "iopub.status.idle": "2022-04-03T17:10:24.526099Z",
     "shell.execute_reply": "2022-04-03T17:10:24.524097Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 21420 characters]\n",
      "text/plain": [
       "<Figure size 864x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "filenames": {
       "image/png": "C:\\Users\\David\\OneDrive\\Desktop\\imwspy\\stanpy\\stanpy\\docs\\_build\\jupyter_execute\\user_guide\\reduction_method_10_0.png"
      },
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "scale = 0.2\n",
    "fig, ax = plt.subplots(figsize=(12, 5))\n",
    "stp.plot_system(ax, *s, lw=1, linestyle=\":\", c=\"#111111\")\n",
    "stp.plot_solution(ax, x=x, y=w_x, scale=scale, linestyle=\"-\", lw=\"2\", flip_y=True)\n",
    "ax.grid(linestyle=\":\")\n",
    "ax.set_axisbelow(True)\n",
    "ax.set_ylim(-1.5, 1.5)\n",
    "ax.set_ylabel(\"w/wmax*{}\".format(scale))\n",
    "ax.set_title(\"[w] = m\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "1f49052b",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-03T17:10:24.530099Z",
     "iopub.status.busy": "2022-04-03T17:10:24.530099Z",
     "iopub.status.idle": "2022-04-03T17:10:24.990104Z",
     "shell.execute_reply": "2022-04-03T17:10:24.989101Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 7756 characters]\n",
      "text/plain": [
       "<Figure size 864x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "filenames": {
       "image/png": "C:\\Users\\David\\OneDrive\\Desktop\\imwspy\\stanpy\\stanpy\\docs\\_build\\jupyter_execute\\user_guide\\reduction_method_11_0.png"
      },
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import stanpy as stp\n",
    "\n",
    "EI = 32000  # kN/m2\n",
    "P = 5  # kN\n",
    "q = 4  # kN/m\n",
    "l = 4  # m\n",
    "\n",
    "roller_support = {\"w\": 0, \"M\": 0, \"H\": 0}\n",
    "fixed_support = {\"w\": 0, \"phi\": 0}\n",
    "hinge = {\"M\": 0}\n",
    "\n",
    "s1 = {\"EI\": EI, \"l\": l, \"bc_i\": fixed_support, \"bc_k\": {\"w\": 0}}\n",
    "s2 = {\"EI\": EI, \"l\": l, \"bc_k\": hinge, \"q\": q}\n",
    "s3 = {\"EI\": EI, \"l\": l, \"bc_k\": roller_support, \"P\": (P, l / 2)}\n",
    "\n",
    "s = [s1, s2, s3]\n",
    "\n",
    "fig, ax = plt.subplots(figsize=(12, 5))\n",
    "stp.plot_system(ax, *s)\n",
    "stp.plot_load(ax, *s)\n",
    "ax.set_ylim(-0.5,1)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "5730b138",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-03T17:10:24.993097Z",
     "iopub.status.busy": "2022-04-03T17:10:24.993097Z",
     "iopub.status.idle": "2022-04-03T17:10:25.049096Z",
     "shell.execute_reply": "2022-04-03T17:10:25.049096Z"
    }
   },
   "outputs": [],
   "source": [
    "dx = 1e-9\n",
    "x_annotate = np.array([dx, l-dx, l, 2 * l, 5 * l / 2 - dx, 5 * l / 2])\n",
    "x = np.sort(np.append(np.linspace(0, 3 * l, 1000), x_annotate))\n",
    "Zi, Zk = stp.tr_solver(*s)\n",
    "Fxx = stp.tr(*s, x=x)\n",
    "Z_x = Fxx.dot(Zi).round(10)\n",
    "\n",
    "w_x = Z_x[:, 0]\n",
    "phi_x = Z_x[:, 1]\n",
    "M_x = Z_x[:, 2]\n",
    "V_x = Z_x[:, 3]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "bb9d5cb6",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-03T17:10:25.054099Z",
     "iopub.status.busy": "2022-04-03T17:10:25.054099Z",
     "iopub.status.idle": "2022-04-03T17:10:25.319096Z",
     "shell.execute_reply": "2022-04-03T17:10:25.319096Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 29692 characters]\n",
      "text/plain": [
       "<Figure size 864x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "filenames": {
       "image/png": "C:\\Users\\David\\OneDrive\\Desktop\\imwspy\\stanpy\\stanpy\\docs\\_build\\jupyter_execute\\user_guide\\reduction_method_13_0.png"
      },
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "scale = 0.5\n",
    "\n",
    "fig, ax = plt.subplots(figsize=(12, 5))\n",
    "stp.plot_system(ax, *s)\n",
    "stp.plot_solution(\n",
    "    ax,\n",
    "    x=x,\n",
    "    y=M_x,\n",
    "    annotate_x=[0, l, 2 * l, 5 * l/2],\n",
    "    fill_p=\"red\",\n",
    "    fill_n=\"blue\",\n",
    "    scale=scale,\n",
    "    alpha=0.2,\n",
    "    flip_y=True\n",
    ")\n",
    "\n",
    "ax.grid(linestyle=\":\")\n",
    "ax.set_axisbelow(True)\n",
    "ax.set_ylim(-1.0, 1)\n",
    "ax.set_ylabel(\"M/Mmax*{}\".format(scale))\n",
    "ax.set_title(\"[M] = kNm\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "51edb7db",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-03T17:10:25.324097Z",
     "iopub.status.busy": "2022-04-03T17:10:25.324097Z",
     "iopub.status.idle": "2022-04-03T17:10:25.589095Z",
     "shell.execute_reply": "2022-04-03T17:10:25.589095Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 27244 characters]\n",
      "text/plain": [
       "<Figure size 864x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "filenames": {
       "image/png": "C:\\Users\\David\\OneDrive\\Desktop\\imwspy\\stanpy\\stanpy\\docs\\_build\\jupyter_execute\\user_guide\\reduction_method_14_0.png"
      },
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "scale = 0.5\n",
    "\n",
    "fig, ax = plt.subplots(figsize=(12, 5))\n",
    "stp.plot_system(ax, *s)\n",
    "stp.plot_solution(\n",
    "    ax,\n",
    "    x=x,\n",
    "    y=V_x,\n",
    "    annotate_x=[dx, l-dx, l, 2*l, 5*l/2-dx, 5*l/2, 3*l],\n",
    "    fill_p=\"red\",\n",
    "    fill_n=\"blue\",\n",
    "    scale=scale,\n",
    "    alpha=0.2,\n",
    ")\n",
    "\n",
    "ax.grid(linestyle=\":\")\n",
    "ax.set_axisbelow(True)\n",
    "ax.set_ylim(-1.0, 1)\n",
    "ax.set_ylabel(\"V/Vmax*{}\".format(scale))\n",
    "ax.set_title(\"[V] = kN\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "64b957e1",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-03T17:10:25.593097Z",
     "iopub.status.busy": "2022-04-03T17:10:25.593097Z",
     "iopub.status.idle": "2022-04-03T17:10:25.873905Z",
     "shell.execute_reply": "2022-04-03T17:10:25.873905Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 20724 characters]\n",
      "text/plain": [
       "<Figure size 864x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "filenames": {
       "image/png": "C:\\Users\\David\\OneDrive\\Desktop\\imwspy\\stanpy\\stanpy\\docs\\_build\\jupyter_execute\\user_guide\\reduction_method_15_0.png"
      },
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "scale = 0.2\n",
    "fig, ax = plt.subplots(figsize=(12, 5))\n",
    "stp.plot_system(ax, *s, lw=1, linestyle=\":\", c=\"#111111\")\n",
    "stp.plot_w(ax, x=x, wx=w_x, scale=scale, linestyle=\"-\")\n",
    "ax.grid(linestyle=\":\")\n",
    "ax.set_axisbelow(True)\n",
    "ax.set_ylim(-1.5, 1.5)\n",
    "ax.set_ylabel(\"w/wmax*{}\".format(scale))\n",
    "ax.set_title(\"[w] = m\")\n",
    "plt.show()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "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.9.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}