Skip to content

Commit 03b704d

Browse files
committed
Update ex01_specimen_amplitudes.ipynb
1 parent 74198d8 commit 03b704d

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

docs/notebooks/ex01_specimen_amplitudes.ipynb

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,16 @@
2828
"metadata": {},
2929
"outputs": [],
3030
"source": [
31+
"import sys\n",
3132
"import felupe as fem\n",
3233
"import matplotlib.pyplot as plt\n",
3334
"import numpy as np\n",
3435
"import termtables as tt\n",
3536
"from pypardiso import spsolve\n",
37+
"import pyvista as pv\n",
38+
"\n",
39+
"if \"google.colab\" in sys.modules:\n",
40+
" pv.start_xvfb()\n",
3641
"\n",
3742
"import fiberreinforcedrubber as frr\n",
3843
"\n",
@@ -186,11 +191,8 @@
186191
"view = fem.ViewMesh(mesh)\n",
187192
"plotter = view.plot(\n",
188193
" notebook=True,\n",
189-
" theme=\"document\",\n",
190194
" add_axes=False,\n",
191-
" edge_color=\"black\",\n",
192195
" color=\"lightgrey\",\n",
193-
" line_width=4,\n",
194196
")\n",
195197
"plotter.show(jupyter_backend=\"static\")"
196198
]
@@ -213,10 +215,9 @@
213215
"view = fem.ViewMesh(fem.mesh.concatenate([fibers_1, fibers_2]))\n",
214216
"plotter = view.plot(\n",
215217
" notebook=True,\n",
216-
" theme=\"document\",\n",
217218
" add_axes=False,\n",
218219
" color=\"black\",\n",
219-
" line_width=4,\n",
220+
" line_width=2,\n",
220221
")\n",
221222
"plotter.show(jupyter_backend=\"static\")"
222223
]
@@ -420,9 +421,9 @@
420421
" view = fem.ViewSolid(field)\n",
421422
" plotter = view.plot(\n",
422423
" notebook=True,\n",
423-
" theme=\"document\",\n",
424424
" show_edges=False,\n",
425425
" add_axes=False,\n",
426+
" color=\"lightgrey\",\n",
426427
" )\n",
427428
" plotter.add_axes(label_size=(0.06, 0.06))\n",
428429
"\n",
@@ -441,6 +442,7 @@
441442
" plotter=plotter,\n",
442443
" line_width=3,\n",
443444
" add_axes=False,\n",
445+
" color=\"lightgrey\",\n",
444446
" )\n",
445447
" fiberplotter = fiberview1.plot(\n",
446448
" \"Normal Force (Range) per Undeformed Area (Fibre) in MPa\",\n",
@@ -452,9 +454,18 @@
452454
" above_color=\"lightgrey\",\n",
453455
" line_width=3,\n",
454456
" add_axes=False,\n",
457+
" color=\"lightgrey\",\n",
455458
" )\n",
456459
" fiberplotter.show(jupyter_backend=\"static\")"
457460
]
461+
},
462+
{
463+
"cell_type": "code",
464+
"execution_count": null,
465+
"id": "f7289d31-536e-46c1-afa5-d1aee857ba1e",
466+
"metadata": {},
467+
"outputs": [],
468+
"source": []
458469
}
459470
],
460471
"metadata": {
@@ -473,7 +484,7 @@
473484
"name": "python",
474485
"nbconvert_exporter": "python",
475486
"pygments_lexer": "ipython3",
476-
"version": "3.10.8"
487+
"version": "3.11.5"
477488
}
478489
},
479490
"nbformat": 4,

0 commit comments

Comments
 (0)