diff --git a/src/Mod/Fem/Gui/Command.cpp b/src/Mod/Fem/Gui/Command.cpp index 21e4ca3e4d..5c5b4c104a 100644 --- a/src/Mod/Fem/Gui/Command.cpp +++ b/src/Mod/Fem/Gui/Command.cpp @@ -1252,7 +1252,7 @@ import FreeCAD\n\ from PySide import QtCore\n\ import numpy as np\n\ from matplotlib import pyplot as plt\n\ -plt.figure(1)\n\ +plt.figure(\"" << titleLabel << "\")\n\ plt.plot(t_coords, membrane, \"k--\")\n\ plt.plot(t_coords, mb, \"b*-\")\n\ plt.plot(t_coords, peak, \"r-x\")\n\ diff --git a/src/Mod/Fem/Gui/TaskPostBoxes.cpp b/src/Mod/Fem/Gui/TaskPostBoxes.cpp index d6a8d844a8..64c017aced 100644 --- a/src/Mod/Fem/Gui/TaskPostBoxes.cpp +++ b/src/Mod/Fem/Gui/TaskPostBoxes.cpp @@ -739,7 +739,7 @@ from PySide import QtCore\n\ import numpy as np\n\ from matplotlib import pyplot as plt\n\ plt.ioff()\n\ -plt.figure(1)\n\ +plt.figure(title)\n\ plt.plot(x, y)\n\ plt.xlabel(\"" << xlabel.toStdString() << "\")\n\ plt.ylabel(title)\n\ diff --git a/src/Mod/Fem/femtaskpanels/task_result_mechanical.py b/src/Mod/Fem/femtaskpanels/task_result_mechanical.py index 696d31d52b..0b867b1b5c 100644 --- a/src/Mod/Fem/femtaskpanels/task_result_mechanical.py +++ b/src/Mod/Fem/femtaskpanels/task_result_mechanical.py @@ -504,6 +504,7 @@ class _TaskPanel: if len(plt.get_fignums()) > 0: plt.close() plt.ioff() # disable interactive mode so we have full control when plot is shown + plt.figure(res_title) plt.hist(res_values, bins=50, alpha=0.5, facecolor="blue") plt.xlabel(res_unit) plt.title(translate("FEM","Histogram of {}").format(res_title))