def data_set1(self): attributes = ['x', 'y'] tooltip = plot_data.Tooltip(attributes=attributes) point_style = plot_data.PointStyle(color_fill=RED, color_stroke=BLACK) edge_style = plot_data.EdgeStyle(color_stroke=BLUE, dashline=[10, 5]) elements = [] for x, y in zip(self.x, self.y1): elements.append({'x': x, 'y': y}) return plot_data.Dataset(elements=elements, name='y = sin(x)', tooltip=tooltip, point_style=point_style, edge_style=edge_style)
def plot_data(self): color_fill = LIGHTBLUE color_stroke = GREY point_style = plot_data.PointStyle(color_fill=color_fill, color_stroke=color_stroke) axis = plot_data.Axis() attributes = ['x', 'y'] tooltip = plot_data.Tooltip(attributes=attributes) return plot_data.Scatter(tooltip=tooltip, x_variable=attributes[0], y_variable=attributes[1], point_style=point_style, elements=self.points, axis=axis)
def plot_data(self): color_fill = LIGHTBLUE color_stroke = GREY point_style = plot_data.PointStyle(color_fill=color_fill, color_stroke=color_stroke) axis = plot_data.Axis() attributes = ['x', 'y'] tooltip = plot_data.Tooltip(attributes=attributes) objects = [ plot_data.Scatter(tooltip=tooltip, x_variable=attributes[0], y_variable=attributes[1], point_style=point_style, elements=self.points, axis=axis) ] edge_style = plot_data.EdgeStyle() rgbs = [[192, 11, 11], [14, 192, 11], [11, 11, 192]] objects.append( plot_data.ParallelPlot(elements=self.points, edge_style=edge_style, disposition='vertical', axes=['x', 'y', 'z', 'm'], rgbs=rgbs)) coords = [(0, 0), (500, 0)] sizes = [ plot_data.Window(width=500, height=500), plot_data.Window(width=500, height=500) ] return plot_data.MultiplePlots(elements=self.points, plots=objects, sizes=sizes, coords=coords)