HauptProgramm.py aktualisiert
This commit is contained in:
parent
aedece476b
commit
0f41b0f540
|
@ -117,13 +117,15 @@ class MyBoxLayout(BoxLayout):
|
|||
plt.xticks(rotation=45)
|
||||
plt.grid(True)
|
||||
|
||||
# Create DiagramWidget and add it to the layout
|
||||
# Create DiagramWidget and add it to the ScrollView
|
||||
self.second_diagram_widget = DiagramWidget(figure=plt.gcf())
|
||||
self.add_widget(self.second_diagram_widget)
|
||||
scroll_view_2 = ScrollView(size_hint=(1, 0.3)) # Make ScrollView take up 30% of screen height
|
||||
scroll_view_2.add_widget(self.second_diagram_widget)
|
||||
self.add_widget(scroll_view_2)
|
||||
|
||||
# Create plot figure
|
||||
self.fig, self.ax = plt.subplots(figsize=(10, 5))
|
||||
self.fig.subplots_adjust(left=0.075, bottom=0.175) # Adjust bottom margin to make space for buttons
|
||||
self.fig.subplots_adjust(left=0.1375, bottom=0.175) # Adjust bottom margin to make space for buttons
|
||||
|
||||
# Add bars to plot using color map
|
||||
for i in range(len(hours)):
|
||||
|
@ -134,7 +136,7 @@ class MyBoxLayout(BoxLayout):
|
|||
|
||||
# Create DiagramWidget and add it to the ScrollView
|
||||
self.diagram_widget = DiagramWidget(figure=self.fig)
|
||||
scroll_view = ScrollView(size_hint=(1, 0.6)) # Make ScrollView take up 60% of screen height
|
||||
scroll_view = ScrollView(size_hint=(0.985, 0.3)) # Make ScrollView take up 30% of screen height
|
||||
scroll_view.add_widget(self.diagram_widget)
|
||||
self.add_widget(scroll_view)
|
||||
|
||||
|
|
Loading…
Reference in New Issue