Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class GraphForm(AnchorLayout):
- def __init__(self, **kwargs):
- super(GraphForm, self).__init__(**kwargs)
- Clock.schedule_once(self.my_init)
- def my_init(self, dt):
- # Initializing the graph instance
- self.graph = Graph(xlabel='X', ylabel='Y', x_ticks_minor=5, x_ticks_major=10, y_ticks_major=20,
- y_grid_label=True, x_grid_label=True, padding=5, x_grid=True, y_grid=True, xmin=-0, xmax=120, ymin=-0, ymax=100)
- self.plot = MeshLinePlot(color=[1, 0, 0, 1])
- self.graph.add_plot(self.plot)
- self.add_widget(self.graph)
- print(self.size)
Advertisement
Add Comment
Please, Sign In to add comment