Jupyter-scatter

Latest version: v0.17.0

Safety actively analyzes 641082 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 8

0.12.5

> **Warning**: do not use this version! The distributed build is broken. Use `v0.12.6` instead. :pray:

- Ensure that the default point colors respect the background when setting both at the same time during initialization. I.e., in the following scenario, the point color will be set to _white_ by default as the background color was set to _black_:

py
jscatter.plot(data=df, background_color='black')


- Fix an issue when working with views of a pandas DataFrame where not all categorical data is present

- Loosen strictness of `rows` and `cols` of `compose()` to allow having empty cells in the grid

0.12.4

- Respect the dictionary key-value order of categorical encoding maps in the legend. E.g., the following categorical color map legend will read `C`, then `B`, and finally `A`:

py
scatter.legend(True)
scatter.color(map=dict(C='red', B='blue', A='pink'))


- Update third-party JS libraries

0.12.3

- Fix incorrect legend for categorical coloring

0.12.2

- Update `regl-scatterplot` to `v1.6.9`

0.12.1

- Fix the ordering of the legend's value labels for continuous encodings such that high to low values are order top to bottom ([70](https://github.com/flekschas/jupyter-scatter/issues/70))

0.12.0

- Add support for referencing points by the Pandas DataFrame's index via `Scatter(data_use_index=True)` or `scatter.data(use_index=True)`. This is useful for synchronizing the selection or filtering of two Scatter instances that operate on different data frames with point correspondences. ([62](https://github.com/flekschas/jupyter-scatter/issues/62)

py
import jscatter
import numpy as np
import pandas as pd

df1 = pd.DataFrame(
data=np.random.rand(16, 2),
index=[chr(65 + x) for x in range(16)],
columns=['x', 'y']
)
df2 = pd.DataFrame(
data=np.random.rand(8, 2),
index=[chr(76 - x) for x in range(8)],
columns=['x', 'y']
)

s1 = jscatter.Scatter(data=df1, data_use_index=True, x='x', y='y', x_scale=[0, 2], y_scale=[0, 1])
s2 = jscatter.Scatter(data=df2, data_use_index=True, x='x', y='y', x_scale=[-1, 1], y_scale=[0, 1])

def on_selection_change(change):
s2.selection(s1.selection())

s1.widget.observe(on_selection_change, names='selection')

jscatter.compose([s1, s2])


https://user-images.githubusercontent.com/932103/223899982-d2837c4d-f486-4f33-af22-cf3866c4983e.mp4

- Avoid unregistering all observers when calling `jscatter.compose()` such that external observers remain registered
- Fix undefined `this` in codec preventing the `scatter.selection()` from working correctly ([66](https://github.com/flekschas/jupyter-scatter/pull/66))

Page 3 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.