[FEM] fix issue that all plot windows had the same name
- they all had the name "figure 1" - thus make the name unique and this way also enable to have several plots open displaying different result types (for the line filter)
This commit is contained in:
@@ -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\
|
||||
|
||||
@@ -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\
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user