2n2u

Untitled

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