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

[ENH] Faster drawing in scatterplot #3871

Merged
merged 3 commits into from
Jun 14, 2019

Conversation

markotoplak
Copy link
Member

Issue

Fixes #3589

Description of changes
  1. Reused QPen, QBrush objects and rounded sizes to half a pixel so that the number of different symbols to draw is lower.
  2. Deferred updateSpots() that gets called by pyqtgraph in set*() to paint(), where spot atlas is actually needed.

Now adult with spots of same color, shape=occupation, size=fnlwgt displays in less than 1 second instead of 10.5s as before.

Includes
  • Code changes
  • Tests
  • Documentation

@codecov
Copy link

codecov bot commented Jun 10, 2019

Codecov Report

Merging #3871 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #3871      +/-   ##
==========================================
+ Coverage   84.97%   84.97%   +<.01%     
==========================================
  Files         378      378              
  Lines       70496    70509      +13     
==========================================
+ Hits        59905    59918      +13     
  Misses      10591    10591

@janezd janezd self-assigned this Jun 12, 2019
@BlazZupan
Copy link
Contributor

Marko, this looks great. Will this change propagate to other point-based visualizations, like in t-SNE and MDS widgets?

@markotoplak
Copy link
Member Author

@BlazZupan, it will propagate to any scatterplot-based point visualization. With how large data sets did you see a difference?

@markotoplak
Copy link
Member Author

@janezd, I replaced lambdas with a function.

@janezd janezd merged commit 514ae98 into biolab:master Jun 14, 2019
@markotoplak markotoplak deleted the faster-scatterplot branch September 3, 2019 10:27
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.

Slow plotting in Scatter Plot
3 participants