20 lines
581 B
Python
20 lines
581 B
Python
from math import sin
|
|
|
|
from kivy.app import App
|
|
from kivy.clock import Clock
|
|
from kivymd.theming import ThemeManager
|
|
from kivy_garden.graph import Graph, MeshLinePlot
|
|
|
|
|
|
class QiFlora(App):
|
|
theme_cls = ThemeManager()
|
|
theme_cls.primary_palette = 'Blue'
|
|
theme_cls.accent_palette = 'DeepOrange'
|
|
theme_cls.theme_style = 'Light'
|
|
|
|
def refresh_data(self, *args):
|
|
plot = MeshLinePlot(color=[1,0,0,1])
|
|
plot.points = [(x, sin(x / 10.)) for x in range(0, 101)]
|
|
self.root.ids.temp_graph.add_plot(plot)
|
|
self.root.ids.moist_graph.add_plot(plot)
|