Beispiel #1
0
 def draw(self, context, rectangle):
     """\brief draw charts
     \param context - cairo context
     \param rectangle - cairo context rectangle
     """
     for chart in self._data_charts:
         draw_chart(context, rectangle, self._chart_rectangle, chart)
Beispiel #2
0
 def draw(self, context, rect):
     context.set_source_rgb(0.5, 0.5, 1)
     drc = drawing_rectangle(lower_x_limit = -10,
                             upper_x_limit = 10,
                             lower_y_limit = -10,
                             upper_y_limit = 20)
     some_data = map(lambda a: (a, a ** 2 - 10), arange(-10, 10, 0.1))
     chart = data_chart(some_data, color = (0, 0, 1))
     draw_chart(context, rect, drc, chart)