Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit c9587b4

Browse files
minor gui fixes
1 parent 30686b9 commit c9587b4

2 files changed

Lines changed: 74 additions & 61 deletions

File tree

PythonGUI_apps/Spectrum_analysis/Spectra_plot_fit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -855,8 +855,8 @@ def plot(self):
855855
try:
856856
result_no = int(self.ui.result_spinBox.value())
857857
if type(self.fit_scan_file['result_0']) == lmfit.model.ModelResult:
858-
self.ui.graphicsView = MatplotlibWidget(dpi=300)
859-
self.fit_scan_file['result_'+str(result_no)].plot(fig=MatplotlibWidget(size=(12,8)).getFigure().add_subplot(111))
858+
self.matplotlibwidget = MatplotlibWidget(size=(12,8), dpi=300)
859+
self.fit_scan_file['result_'+str(result_no)].plot(fig=self.matplotlibwidget.getFigure().add_subplot(111))
860860
plt.tick_params(length=8, width=3)
861861
plt.xlabel("Wavelength (nm)", fontsize=25, fontweight='bold')
862862
plt.ylabel("Intensity (a.u.)", fontsize=25, fontweight='bold')

PythonGUI_apps/Spectrum_analysis/analyze_fit_results.ui

Lines changed: 72 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -6,70 +6,83 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>543</width>
10-
<height>199</height>
9+
<width>664</width>
10+
<height>136</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
1414
<string>Analze Fit Results</string>
1515
</property>
16-
<layout class="QGridLayout" name="gridLayout">
17-
<item row="1" column="1">
18-
<widget class="QSpinBox" name="result_spinBox">
19-
<property name="font">
20-
<font>
21-
<pointsize>12</pointsize>
22-
</font>
23-
</property>
24-
<property name="maximum">
25-
<number>1000000000</number>
26-
</property>
27-
</widget>
28-
</item>
29-
<item row="0" column="0" colspan="3">
30-
<widget class="QLabel" name="label_2">
31-
<property name="font">
32-
<font>
33-
<pointsize>15</pointsize>
34-
</font>
35-
</property>
36-
<property name="text">
37-
<string>Analyze Fit Results</string>
38-
</property>
39-
<property name="alignment">
40-
<set>Qt::AlignCenter</set>
41-
</property>
42-
</widget>
43-
</item>
44-
<item row="1" column="0">
45-
<widget class="QLabel" name="label">
46-
<property name="font">
47-
<font>
48-
<pointsize>12</pointsize>
49-
</font>
50-
</property>
51-
<property name="text">
52-
<string>Result number:</string>
53-
</property>
54-
<property name="alignment">
55-
<set>Qt::AlignCenter</set>
56-
</property>
57-
</widget>
58-
</item>
59-
<item row="1" column="2">
60-
<widget class="QPushButton" name="plot_pushButton">
61-
<property name="font">
62-
<font>
63-
<pointsize>12</pointsize>
64-
</font>
65-
</property>
66-
<property name="text">
67-
<string>Check!</string>
68-
</property>
69-
</widget>
70-
</item>
71-
<item row="2" column="0" colspan="3">
72-
<widget class="QGraphicsView" name="graphicsView"/>
16+
<layout class="QVBoxLayout" name="verticalLayout">
17+
<item>
18+
<layout class="QGridLayout" name="gridLayout_3">
19+
<item row="0" column="0">
20+
<widget class="QFrame" name="frame">
21+
<property name="frameShape">
22+
<enum>QFrame::StyledPanel</enum>
23+
</property>
24+
<property name="frameShadow">
25+
<enum>QFrame::Raised</enum>
26+
</property>
27+
<layout class="QGridLayout" name="gridLayout">
28+
<item row="1" column="2">
29+
<widget class="QPushButton" name="plot_pushButton">
30+
<property name="font">
31+
<font>
32+
<pointsize>12</pointsize>
33+
</font>
34+
</property>
35+
<property name="text">
36+
<string>Check!</string>
37+
</property>
38+
</widget>
39+
</item>
40+
<item row="1" column="1">
41+
<widget class="QSpinBox" name="result_spinBox">
42+
<property name="font">
43+
<font>
44+
<pointsize>12</pointsize>
45+
</font>
46+
</property>
47+
<property name="maximum">
48+
<number>1000000000</number>
49+
</property>
50+
</widget>
51+
</item>
52+
<item row="1" column="0">
53+
<widget class="QLabel" name="label">
54+
<property name="font">
55+
<font>
56+
<pointsize>12</pointsize>
57+
</font>
58+
</property>
59+
<property name="text">
60+
<string>Result number:</string>
61+
</property>
62+
<property name="alignment">
63+
<set>Qt::AlignCenter</set>
64+
</property>
65+
</widget>
66+
</item>
67+
<item row="0" column="0" colspan="3">
68+
<widget class="QLabel" name="label_2">
69+
<property name="font">
70+
<font>
71+
<pointsize>15</pointsize>
72+
</font>
73+
</property>
74+
<property name="text">
75+
<string>Analyze Fit Results</string>
76+
</property>
77+
<property name="alignment">
78+
<set>Qt::AlignCenter</set>
79+
</property>
80+
</widget>
81+
</item>
82+
</layout>
83+
</widget>
84+
</item>
85+
</layout>
7386
</item>
7487
</layout>
7588
</widget>

0 commit comments

Comments
 (0)