# scatter_plot.py
from mdvtools.charts.base_plot import BasePlot
[docs]
class ScatterPlot(BasePlot):
def __init__(self, title, params, size, position, id=None, **kwargs):
super().__init__(
title, "wgl_scatter_plot", params, size, position, id, **kwargs
)
[docs]
def set_default_color(self, color):
self.plot_data["default_color"] = color
[docs]
def set_brush(self, brush_type):
self.plot_data["brush"] = brush_type
[docs]
def set_filter(self, filter_type):
self.plot_data["on_filter"] = filter_type
[docs]
def set_radius(self, radius):
self.plot_data["radius"] = radius
[docs]
def set_opacity(self, opacity):
self.plot_data["opacity"] = opacity
[docs]
def set_color_by(self, color_by):
self.plot_data["color_by"] = color_by
[docs]
def set_color_legend(self, display, position):
self.plot_data["color_legend"] = {"display": display, "pos": position}
# Any additional methods specific to scatter plots can be added here