{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "bf55c4af",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-07T14:28:02.437869Z",
     "iopub.status.busy": "2022-04-07T14:28:02.436868Z",
     "iopub.status.idle": "2022-04-07T14:28:02.611862Z",
     "shell.execute_reply": "2022-04-07T14:28:02.611862Z"
    }
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "np.set_printoptions(precision=5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "5a80785a",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-07T14:28:02.615871Z",
     "iopub.status.busy": "2022-04-07T14:28:02.615871Z",
     "iopub.status.idle": "2022-04-07T14:28:05.746868Z",
     "shell.execute_reply": "2022-04-07T14:28:05.746868Z"
    }
   },
   "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": "5a68c63f",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-07T14:28:05.750869Z",
     "iopub.status.busy": "2022-04-07T14:28:05.750869Z",
     "iopub.status.idle": "2022-04-07T14:28:05.791866Z",
     "shell.execute_reply": "2022-04-07T14:28:05.791866Z"
    }
   },
   "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": "fcdffa0a",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-07T14:28:05.795868Z",
     "iopub.status.busy": "2022-04-07T14:28:05.795868Z",
     "iopub.status.idle": "2022-04-07T14:28:06.046868Z",
     "shell.execute_reply": "2022-04-07T14:28:06.046868Z"
    }
   },
   "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": "e9e6ffd8",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-07T14:28:06.050868Z",
     "iopub.status.busy": "2022-04-07T14:28:06.050868Z",
     "iopub.status.idle": "2022-04-07T14:28:06.332869Z",
     "shell.execute_reply": "2022-04-07T14:28:06.331861Z"
    }
   },
   "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": "87025615",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-07T14:28:06.337869Z",
     "iopub.status.busy": "2022-04-07T14:28:06.336868Z",
     "iopub.status.idle": "2022-04-07T14:28:06.527873Z",
     "shell.execute_reply": "2022-04-07T14:28:06.526869Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 21392 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": "64ca9cb7",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-07T14:28:06.531870Z",
     "iopub.status.busy": "2022-04-07T14:28:06.531870Z",
     "iopub.status.idle": "2022-04-07T14:28:06.721870Z",
     "shell.execute_reply": "2022-04-07T14:28:06.721870Z"
    }
   },
   "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": "58f78c41",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-07T14:28:06.725868Z",
     "iopub.status.busy": "2022-04-07T14:28:06.725868Z",
     "iopub.status.idle": "2022-04-07T14:28:06.766869Z",
     "shell.execute_reply": "2022-04-07T14:28:06.766869Z"
    }
   },
   "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": "e5e266b5",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-07T14:28:06.770868Z",
     "iopub.status.busy": "2022-04-07T14:28:06.770868Z",
     "iopub.status.idle": "2022-04-07T14:28:07.096862Z",
     "shell.execute_reply": "2022-04-07T14:28:07.096862Z"
    }
   },
   "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": "e4212927",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-07T14:28:07.100864Z",
     "iopub.status.busy": "2022-04-07T14:28:07.100864Z",
     "iopub.status.idle": "2022-04-07T14:28:07.322872Z",
     "shell.execute_reply": "2022-04-07T14:28:07.321863Z"
    }
   },
   "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": "b9b69a04",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-07T14:28:07.326870Z",
     "iopub.status.busy": "2022-04-07T14:28:07.326870Z",
     "iopub.status.idle": "2022-04-07T14:28:07.503873Z",
     "shell.execute_reply": "2022-04-07T14:28:07.501868Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 21492 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": "c6435daf",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-07T14:28:07.507870Z",
     "iopub.status.busy": "2022-04-07T14:28:07.507870Z",
     "iopub.status.idle": "2022-04-07T14:28:07.711865Z",
     "shell.execute_reply": "2022-04-07T14:28:07.711865Z"
    }
   },
   "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": "5912733c",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-07T14:28:07.715868Z",
     "iopub.status.busy": "2022-04-07T14:28:07.715868Z",
     "iopub.status.idle": "2022-04-07T14:28:07.756866Z",
     "shell.execute_reply": "2022-04-07T14:28:07.756866Z"
    }
   },
   "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": "638e43f2",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-07T14:28:07.760868Z",
     "iopub.status.busy": "2022-04-07T14:28:07.760868Z",
     "iopub.status.idle": "2022-04-07T14:28:07.981862Z",
     "shell.execute_reply": "2022-04-07T14:28:07.981862Z"
    }
   },
   "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": "c00f3407",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-07T14:28:07.985870Z",
     "iopub.status.busy": "2022-04-07T14:28:07.985870Z",
     "iopub.status.idle": "2022-04-07T14:28:08.221862Z",
     "shell.execute_reply": "2022-04-07T14:28:08.221862Z"
    }
   },
   "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": "7e413e40",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-04-07T14:28:08.225869Z",
     "iopub.status.busy": "2022-04-07T14:28:08.225869Z",
     "iopub.status.idle": "2022-04-07T14:28:08.431870Z",
     "shell.execute_reply": "2022-04-07T14:28:08.431870Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 20848 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
}