Skip to content

[FIX] Scatter Plot: Replot when input features change#5837

Merged
janezd merged 1 commit intobiolab:masterfrom
VesnaT:scatterplot_attrs_invalidated
Feb 23, 2022
Merged

[FIX] Scatter Plot: Replot when input features change#5837
janezd merged 1 commit intobiolab:masterfrom
VesnaT:scatterplot_attrs_invalidated

Conversation

@VesnaT
Copy link
Contributor

@VesnaT VesnaT commented Feb 11, 2022

Issue

Scatter Plot widget does not always refresh the plot on input features change. To obtain this behaviour the features must be connected before the data (see the included test).

To reproduce, open the attached workflow and change the selection in the Correlations widget. The plot in Scatter Plot does not change accordingly.
untitled.ows.zip

Description of changes
  • introduce _attrs_invalidated variable in Scatter Plot widget
Includes
  • Code changes
  • Tests
  • Documentation

@VesnaT VesnaT changed the title Scatter Plot: Replot when input attributes change [FIX] Scatter Plot: Replot when input features change Feb 11, 2022
@codecov
Copy link

codecov bot commented Feb 11, 2022

Codecov Report

Merging #5837 (589345f) into master (5a57006) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #5837      +/-   ##
==========================================
+ Coverage   86.20%   86.24%   +0.03%     
==========================================
  Files         316      315       -1     
  Lines       66627    66675      +48     
==========================================
+ Hits        57437    57504      +67     
+ Misses       9190     9171      -19     

@janezd janezd self-assigned this Feb 18, 2022
@janezd
Copy link
Contributor

janezd commented Feb 18, 2022

Just a though: what about renaming _attrs_invalidated to _xy_invalidated or even _xy_changed?

Currently, there exist _invalidated and _domain_invalidated, the former referring to the change of effective data and the latter to change of variables that appear in effective data. Both names are not the most informative (I suppose that because we did not expect to have multiple "invalidates".) We can't rename the existing attributes, but the newcomer could have a more informative name.

If you prefer to keep _attrs_invalidate, say so, and I merge.

@VesnaT VesnaT force-pushed the scatterplot_attrs_invalidated branch from 8d09644 to 589345f Compare February 23, 2022 08:38
@VesnaT
Copy link
Contributor Author

VesnaT commented Feb 23, 2022

I liked the suggestion so I changed the name.

@janezd janezd merged commit 05fc0df into biolab:master Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants