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

Interactive scalar bars #79

Merged
merged 9 commits into from Feb 21, 2019
Merged

Interactive scalar bars #79

merged 9 commits into from Feb 21, 2019

Conversation

banesullivan
Copy link
Member

@banesullivan banesullivan commented Feb 11, 2019

The scalar bar code needs to be updated to give users more control over where to place scalar bars and whether or not they should be present.

What should be the default behavior of the scalar bars?

  • Should a scalar bar always be added when adding a mesh?
  • Should it be interactive by default?

Todo:

  • add scalar bar widgets for interactivity.
  • add an option to not display a scalar bar when adding a mesh with a scalar array.
  • make a better scheme for automatically placing new scalar bars (interactive and non-interactive) Maybe down the road. Use interactive scalar bars to place where desired for now
  • add a way for vertical scalar bars to have vertical text Requires a lot of effort... maybe down the road.

@banesullivan banesullivan added discussion Thought provoking threads where decisions have to be made in-progress labels Feb 11, 2019
@akaszynski
Copy link
Member

I think adding a scalar bar for each mesh would make the render window cluttered. We might want to limit the number of "automatic" scalar bars to two. They probably should be automatic if there mesh has scalars.

@banesullivan
Copy link
Member Author

banesullivan commented Feb 11, 2019

I think adding a scalar bar for each mesh would make the render window cluttered.

Agreed. A while back I added code so that if n meshes are added and plotted with a scalar array of the same name or stitle then they will both share a single scalar bar and the mapping will be updated to the full data range across those n datasets. Note that this can get buggy if the cmaps are not the same.

We might want to limit the number of "automatic" scalar bars to two.

To implement this, should we check how many scalar bars are present and if there are two, then only add the scalar bar if the user explicitly says to: show_scalar_bar=True and make default parameter for show_scalar_bar=None

@banesullivan banesullivan added the proposed-change Something with regards to the API or internal structure is changing. label Feb 11, 2019
@codecov
Copy link

codecov bot commented Feb 15, 2019

Codecov Report

Merging #79 into master will decrease coverage by 0.17%.
The diff coverage is 43.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #79      +/-   ##
==========================================
- Coverage   88.43%   88.25%   -0.18%     
==========================================
  Files          16       16              
  Lines        4184     4198      +14     
==========================================
+ Hits         3700     3705       +5     
- Misses        484      493       +9
Impacted Files Coverage Δ
vtki/plotting.py 83.16% <43.75%> (-0.62%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 225bfcf...1dc04e0. Read the comment docs.

Copy link
Member Author

@banesullivan banesullivan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vtki/plotting.py Show resolved Hide resolved
@banesullivan banesullivan changed the title WIP: better scalar bars Interactive scalar bars Feb 21, 2019
@banesullivan banesullivan merged commit 149170b into master Feb 21, 2019
@banesullivan banesullivan deleted the scalar-bar branch February 25, 2019 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Thought provoking threads where decisions have to be made proposed-change Something with regards to the API or internal structure is changing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants