Skip to content

Commit c3b9388

Browse files
committed
call set_window_title on manager
1 parent 744a625 commit c3b9388

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

EVSVesuvio/vesuvio_analysis/fit_in_yspace.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ def runMinos(mObj, yFitIC, constrFunc, wsName):
779779
minosAutoErr = list(np.zeros(np.array(minosManErr).shape))
780780

781781
if yFitIC.showPlots:
782-
fig.canvas.set_window_title(wsName+"_Manual_Implementation_MINOS")
782+
fig.canvas.manager.set_window_title(wsName+"_Manual_Implementation_MINOS")
783783
fig.show()
784784

785785
return parameters, values, errors, minosAutoErr, minosManErr
@@ -801,7 +801,7 @@ def runAndPlotManualMinos(minuitObj, constrFunc, bestFitVals, bestFitErrs, showP
801801
# Output plot to Mantid
802802
fig, axs = plt.subplots(height, width, tight_layout=True, figsize=figsize, subplot_kw={
803803
'projection':'mantid'}) #subplot_kw={'projection':'mantid'}
804-
# fig.canvas.set_window_title("Plot of Manual Implementation MINOS")
804+
# fig.canvas.manager.set_window_title("Plot of Manual Implementation MINOS")
805805

806806
merrors = {}
807807
for p, ax in zip(minuitObj.parameters, axs.flat):
@@ -926,7 +926,7 @@ def plotAutoMinos(minuitObj, wsName):
926926
figsize = (12, 7)
927927
# Output plot to Mantid
928928
fig, axs = plt.subplots(height, width, tight_layout=True, figsize=figsize, subplot_kw={'projection':'mantid'})
929-
fig.canvas.set_window_title(wsName+"_Plot_Automatic_MINOS")
929+
fig.canvas.manager.set_window_title(wsName+"_Plot_Automatic_MINOS")
930930

931931
for p, ax in zip(minuitObj.parameters, axs.flat):
932932
loc, fvals, status = minuitObj.mnprofile(p, bound=2)
@@ -1314,7 +1314,7 @@ def groupDetectors(ipData, yFitIC):
13141314

13151315
if yFitIC.showPlots:
13161316
fig, ax = plt.subplots(tight_layout=True, subplot_kw={'projection':'mantid'})
1317-
fig.canvas.set_window_title("Grouping of detectors")
1317+
fig.canvas.manager.set_window_title("Grouping of detectors")
13181318
plotFinalGroups(ax, ipData, idxList)
13191319
fig.show()
13201320
return idxList
@@ -1420,7 +1420,7 @@ def formIdxList(clusters):
14201420
def plotDetsAndInitialCenters(L1, theta, centers):
14211421
"""Used in debugging."""
14221422
fig, ax = plt.subplots(tight_layout=True, subplot_kw={'projection':'mantid'})
1423-
fig.canvas.set_window_title("Starting centroids for groupings")
1423+
fig.canvas.manager.set_window_title("Starting centroids for groupings")
14241424
ax.scatter(L1, theta, alpha=0.3, color="r", label="Detectors")
14251425
ax.scatter(centers[:, 0], centers[:, 1], color="k", label="Starting centroids")
14261426
ax.axes.xaxis.set_ticks([]) # Numbers plotted do not correspond to real numbers, so hide them
@@ -1591,7 +1591,7 @@ def plotGlobalFit(dataX, dataY, dataE, mObj, totCost, wsName):
15911591
tight_layout=True,
15921592
subplot_kw={'projection':'mantid'}
15931593
)
1594-
fig.canvas.set_window_title(wsName+"_Plot_of_Global_Fit")
1594+
fig.canvas.manager.set_window_title(wsName+"_Plot_of_Global_Fit")
15951595

15961596
# Data used in Global Fit
15971597
for i, (x, y, yerr, ax) in enumerate(zip(dataX, dataY, dataE, axs.flat)):

0 commit comments

Comments
 (0)