Plot: Expose src/Mod/Plot strings to translation

Closes https://github.com/FreeCAD/FreeCAD-translations/issues/60
This commit is contained in:
luz paz
2021-09-18 07:36:31 -04:00
committed by Uwe
parent ccc45659b0
commit 7375b3aa82

View File

@@ -1,7 +1,6 @@
#***************************************************************************
#* *
#* Copyright (c) 2011, 2012 *
#* Jose Luis Cercos Pita <jlcercos@gmail.com> *
#* Copyright (c) 2011, 2012 Jose Luis Cercos Pita <jlcercos@gmail.com> *
#* *
#* This program is free software; you can redistribute it and/or modify *
#* it under the terms of the GNU Lesser General Public License (LGPL) *
@@ -31,7 +30,7 @@ import sys
try:
import matplotlib
matplotlib.use('Qt5Agg')
# Force matplotlib to use PySide backend by temporarily unloading PyQt
if 'PyQt5.QtCore' in sys.modules:
del sys.modules['PyQt5.QtCore']
@@ -85,6 +84,7 @@ def getPlot():
return i
return None
def closePlot():
""" closePlot(): Close the active plot window. """
# Get active tab
@@ -98,7 +98,8 @@ def closePlot():
for i in sub.children():
if i.metaObject().className() == "Plot":
sub.close()
def figure(winTitle="plot"):
"""Create a new plot subwindow/tab.