Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The plot should be invariant against reordering of the table rows #181

Closed
LucaMarconato opened this issue Nov 5, 2023 · 1 comment · Fixed by #208
Closed

The plot should be invariant against reordering of the table rows #181

LucaMarconato opened this issue Nov 5, 2023 · 1 comment · Fixed by #208

Comments

@LucaMarconato
Copy link
Member

As it can be observed when running this code: #175 (comment)

Shuffling the rows of the table changes the plots, while it should not. This happens because currently instance_key is ignored. A solution is to call the function match_table_to_element() to match the rows of the table to the geometries to display https://github.com/scverse/spatialdata/blob/bf3377fd36f94ef51a233ae71312b1c28e978e6e/src/spatialdata/_core/query/relational_query.py#L134.

Weirdly, the bug appears only for labels and not for circles. The reason is probably the use of the fragile mechanism around _labels_key in _model.py, reason for which I suggest to first clean up the codebase around the model as described here #180, and then address the current issue.

This was referenced Mar 8, 2024
@LucaMarconato LucaMarconato linked a pull request Mar 13, 2024 that will close this issue
@melonora
Copy link
Collaborator

Based on #208 I will close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants