Scatter with Effect

This is a variant of the Scatterchart that adds an effect to specified points to highlight them.

The Method To Use

The method is s.plt.scatter_with_effect().

It must contain the following input variables:

order: int
x: str
y: str
data: Optional[Union[List[str], DataFrame, List[Dict]]]

Accepts the following input variables as optional:

x_axis_name: Optional[str] = None 
y_axis_name: Optional[str] = None
title: Optional[str] = None
rows_size: Optional[int] = None
cols_size: Optional[int] = None
padding: Optional[List[int]] = None 
effect_points: Optional[List] = None
option_modifications: Optional[Dict] = None
variant: Optional[str] = None

Examples

The execution of the following code:

scatter_data_raw = [
    [161.2, 51.6], [167.5, 59.0], [159.5, 49.2], [157.0, 63.0], [155.8, 53.6],
    [170.0, 59.0], [159.1, 47.6], [166.0, 69.8], [176.2, 66.8], [160.2, 75.2],
    [172.5, 55.2], [170.9, 54.2], [172.9, 62.5], [153.4, 42.0], [160.0, 50.0],
    [147.2, 49.8], [168.2, 49.2], [175.0, 73.2], [157.0, 47.8], [167.6, 68.8],
    [159.5, 50.6], [175.0, 82.5], [166.8, 57.2], [176.5, 87.8], [170.2, 72.8],
    [174.0, 54.5], [173.0, 59.8], [179.9, 67.3], [170.5, 67.8], [160.0, 47.0],
    [154.4, 46.2], [162.0, 55.0], [176.5, 83.0], [160.0, 54.4], [152.0, 45.8],
    [162.1, 53.6], [170.0, 73.2], [160.2, 52.1], [161.3, 67.9], [166.4, 56.6],
    [168.9, 62.3], [163.8, 58.5], [167.6, 54.5], [160.0, 50.2], [161.3, 60.3],
    [167.6, 58.3], [165.1, 56.2], [160.0, 50.2], [170.0, 72.9], [157.5, 59.8],
]

scatter_source = [{'x': point[0], 'y': point[1]} for point in scatter_data_raw]

s.plt.scatter_with_effect(
    data=scatter_source,
    x='x', y='y', order=0,
    x_axis_name='X axis',
    y_axis_name='Y axis',
    title='Scatter with effect',
    effect_points=[1, 2, [172.7, 105.2], [153.4, 42]]
)

Last updated